feat: add github-actions-hardening skill#2002
Open
AmirhosseinHonardoust wants to merge 2 commits into
Open
Conversation
Contributor
|
🟡 Contributor Reputation Check: MEDIUM risk
Maintainers: please review this contributor before merging. |
Contributor
🔒 PR Risk Scan ResultsScanned 7 changed file(s).
|
Contributor
🔍 Skill Validator Results
Summary
Full validator output |
Contributor
|
🟡 Contributor Reputation Check: MEDIUM risk
Maintainers: please review this contributor before merging. |
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
Adds a new skill,
github-actions-hardening, that reviews and hardens GitHub Actions workflow files against the Actions-specific threat model; the class of issues general code scanners and language linters miss because the vulnerability lives in the YAML and in how${{ }}expressions are expanded into a shell before a step runs.Why this fills a gap
The repo already has a broad
security-reviewskill (application-code vulnerabilities) and agithub-actions-ci-cd-best-practicesinstructions file (general pipeline structure). Neither focuses on workflow security hardening. This skill covers the high-uplift cases where models otherwise generate insecure defaults:${{ github.event.* }}/github.head_refvalues interpolated intorun:andactions/github-scriptsteps, with theenv:safe-pattern fix.pull_request_target/workflow_runprivilege escalation, checking out and executing fork code with a write token and secrets, plus the safe two-workflow pattern.github-actions.permissions:scoping and OIDC instead of long-lived cloud secrets.GITHUB_ENV/GITHUB_OUTPUTinjection, secret hygiene,persist-credentials, and self-hosted runner exposure on public repos.Structure
SKILL.mdplus fivereferences/files (progressive disclosure), matching the format of existing skills such assecurity-review.Validation
npm startto regenerate the skills index so it includes the new skill.npm run skill:validatepasses (all skills valid, includinggithub-actions-hardening).