-
Notifications
You must be signed in to change notification settings - Fork 1
Potential fix for code scanning alert no. 67: Workflow does not contain permissions #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…in permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
|
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the Tx GitHub Actions workflow to enforce least-privilege by adding a permissions block that restricts the GITHUB_TOKEN to read-only repository contents, resolving the code-scanning alert. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Delete .github/dependabot.yml Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Potential fix for code scanning alert no. 997: Workflow does not contain permissions (#64) Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update codecov.yml (#67) Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update codeql.yml (#71) Chores: Fix blank line indentation in .github/workflows/codeql.yml Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Potential fix for code scanning alert no. 67: Workflow does not contain permissions (#74) To fix this issue, add a permissions block with least privilege at the root level of the workflow (just after the name: or the on: block), or scoped to the test-tx job if different jobs have distinct needs. For this workflow, since it primarily checks out code, installs dependencies, runs lint, coverage, and pushes coverage data (to Codecov, not back to GitHub), it only requires read access to repository contents. Thus, set permissions: contents: read at the workflow level, which restricts the GITHUB_TOKEN in all jobs unless overridden. Edit .github/workflows/tx-build.yml: Insert the following under the name: Tx line (before on:): permissions: contents: read No method, import, or other code is needed; this is a pure configuration change. Suggested fixes powered by Copilot Autofix. Review carefully before merging. Summary by Sourcery CI: Add permissions.contents: read at the root of .github/workflows/tx-build.yml to grant only read access to repository contents -------------------- #74 (comment) -------------------- #74 (comment) Codecov Report ✅ All modified and coverable lines are covered by tests. ✅ Project coverage is 89.13%. Comparing base (ff99c86) to head (c4fd07e).⚠️ Report is 8 commits behind head on master. Additional details and impacted files 🚀 New features to boost your workflow: ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems. 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges. -------------------------------- Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --------- Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…in permissions (#74) To fix this issue, add a permissions block with least privilege at the root level of the workflow (just after the name: or the on: block), or scoped to the test-tx job if different jobs have distinct needs. For this workflow, since it primarily checks out code, installs dependencies, runs lint, coverage, and pushes coverage data (to Codecov, not back to GitHub), it only requires read access to repository contents. Thus, set permissions: contents: read at the workflow level, which restricts the GITHUB_TOKEN in all jobs unless overridden. Edit .github/workflows/tx-build.yml: Insert the following under the name: Tx line (before on:): permissions: contents: read No method, import, or other code is needed; this is a pure configuration change. Suggested fixes powered by Copilot Autofix. Review carefully before merging. Summary by Sourcery CI: Add permissions.contents: read at the root of .github/workflows/tx-build.yml to grant only read access to repository contents -------------------- #74 (comment) -------------------- #74 (comment) Codecov Report ✅ All modified and coverable lines are covered by tests. ✅ Project coverage is 89.13%. Comparing base (ff99c86) to head (c4fd07e).⚠️ Report is 8 commits behind head on master. Additional details and impacted files 🚀 New features to boost your workflow: ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems. 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges. -------------------------------- Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Potential fix for https://github.com/Dargon789/Ethereumjs-Webserver/security/code-scanning/67
To fix this issue, add a
permissionsblock with least privilege at the root level of the workflow (just after thename:or theon:block), or scoped to thetest-txjob if different jobs have distinct needs. For this workflow, since it primarily checks out code, installs dependencies, runs lint, coverage, and pushes coverage data (to Codecov, not back to GitHub), it only requires read access to repository contents. Thus, setpermissions: contents: readat the workflow level, which restricts the GITHUB_TOKEN in all jobs unless overridden.Edit
.github/workflows/tx-build.yml:name: Txline (beforeon:):No method, import, or other code is needed; this is a pure configuration change.
Suggested fixes powered by Copilot Autofix. Review carefully before merging.
Summary by Sourcery
CI: