Skip to content

roseteromeo56/dogecoin#7

Merged
roseteromeo56 merged 9 commits into
roseteromeo56:masterfrom
roseteromeo56-cb-id:master
Jun 5, 2025
Merged

roseteromeo56/dogecoin#7
roseteromeo56 merged 9 commits into
roseteromeo56:masterfrom
roseteromeo56-cb-id:master

Conversation

@roseteromeo56

Copy link
Copy Markdown
Owner

Romeo Rosete

roseteromeo56 and others added 9 commits June 4, 2025 16:42
roseteromeo56.cb.id/dogecoin
…nsitive information

Romeo Rosete

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Potential fix for code scanning alert no. 8: Clear-text logging of sensitive information
…nsitive information

Romeo Rosete

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Potential fix for code scanning alert no. 9: Clear-text logging of sensitive information
…n permissions

Romeo Rosete

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Potential fix for code scanning alert no. 3: Workflow does not contain permissions
…n permissions

Romeo Rosete

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Potential fix for code scanning alert no. 2: Workflow does not contain permissions
@roseteromeo56 roseteromeo56 added this to the roseteromeo56 milestone Jun 5, 2025
@roseteromeo56 roseteromeo56 self-assigned this Jun 5, 2025
Copilot AI review requested due to automatic review settings June 5, 2025 14:29
@roseteromeo56 roseteromeo56 added Dependencies Pull request that update a dependency file Owner Pull request that update a Owner file labels Jun 5, 2025

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Dogecoin authentication configuration by writing the generated credentials to dogecoin.conf instead of printing them to stdout, and it ensures that GitHub Actions workflows have the appropriate read permissions for repository contents.

  • Replaces printed messages with secure file writing in rpcuser.py.
  • Adds "contents: read" permissions to the linter and CI workflow YAML files.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
share/rpcuser/rpcuser.py Updates authentication output to securely write to dogecoin.conf and inform the user.
.github/workflows/linter.yml Adds permissions to allow read access to repository contents.
.github/workflows/ci.yml Adds permissions to allow read access to repository contents.

Comment thread share/rpcuser/rpcuser.py
Comment on lines +34 to +36
print('String has been securely written to dogecoin.conf:')
with open('dogecoin.conf', 'a') as conf_file:
conf_file.write(f'rpcauth={username}:{salt}${password_hmac}\n')

Copilot AI Jun 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding error handling around file I/O operations to gracefully handle potential issues such as permission errors or disk write failures.

Suggested change
print('String has been securely written to dogecoin.conf:')
with open('dogecoin.conf', 'a') as conf_file:
conf_file.write(f'rpcauth={username}:{salt}${password_hmac}\n')
try:
with open('dogecoin.conf', 'a') as conf_file:
conf_file.write(f'rpcauth={username}:{salt}${password_hmac}\n')
print('String has been securely written to dogecoin.conf:')
except (IOError, OSError) as e:
sys.stderr.write(f'Error writing to dogecoin.conf: {e}\n')
sys.exit(1)

Copilot uses AI. Check for mistakes.
@roseteromeo56 roseteromeo56 merged commit e0ba568 into roseteromeo56:master Jun 5, 2025
2 checks passed
roseteromeo56 added a commit that referenced this pull request Jun 19, 2025
roseteromeo56.cb.id/dogecoin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dependencies Pull request that update a dependency file Owner Pull request that update a Owner file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants