fix: harden repo settings#296
Merged
Merged
Conversation
Contributor
Reviewer's GuideThis PR hardens the GitHub Actions supply chain by pinning all third‑party actions to specific commit SHAs, tightening workflow permissions to read‑only where possible, documenting the strategy in the architecture docs, and adding Dependabot configuration to keep GitHub Actions pins up to date. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/codeql.yml" line_range="11-12" />
<code_context>
PACKAGE_NAME: json2xml_rs
PYTHON_VERSION: '3.12'
+permissions:
+ contents: read
+
jobs:
</code_context>
<issue_to_address>
**🚨 issue (security):** CodeQL needs `security-events: write` permission in addition to `contents: read`.
Because you’ve set `permissions: contents: read` at the workflow level, all other default permissions are now `none`, including `security-events`. The CodeQL action needs `security-events: write` to upload results to the code scanning dashboard, otherwise the analysis runs but can’t publish findings.
You should update this block to:
```yaml
permissions:
contents: read
security-events: write
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #296 +/- ##
=======================================
Coverage 98.56% 98.56%
=======================================
Files 6 6
Lines 487 487
=======================================
Hits 480 480
Misses 7 7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Harden GitHub repository automation by tightening workflow permissions, pinning third-party GitHub Actions to specific commits, and documenting the CI supply-chain strategy.
Build:
CI:
Documentation: