fix: pin 6 unpinned action(s),extract 2 unsafe expression(s) to env vars#1297
fix: pin 6 unpinned action(s),extract 2 unsafe expression(s) to env vars#1297dagecko wants to merge 3 commits intodanielmiessler:masterfrom
Conversation
|
@dagecko This looks interesting! Do you have another link for the incident report? The one you shared returns a 404 not found. I've also looked at the https://github.com/tj-actions/changed-files/ repo, and there don't seem to be any pinned issues nor security advisories that would highlight this. |
|
I have preemptively disabled all github actions until this issue is properly investigated. |
|
Hey @ItsIgnacioPortal, thanks for looking into this. The broken link was from an earlier version of the PR template, apologies about that. Here's the research doc: https://www.vigilantdefense.com/research/github-top-50k-repos-cicd-security-scan For the tj-actions incident specifically, here are some good references:
The tj-actions/changed-files repo was cleaned up after the incident, which is why you won't find pinned issues or advisories there anymore. The attack compromised the action by force-pushing a malicious commit to the mutable version tag, which meant every repo referencing it by tag (instead of SHA) executed attacker code in their CI. Also, we had a fork issue that closed the original PR (#1296). This one (#1297) is the resubmission with the same fixes. Sorry for the noise. |
|
@ItsIgnacioPortal I really appreciate you taking this seriously. You'd be surprised how many people brush it off. It's been a long day of trying to get these fixed across projects, so it's refreshing to see someone act on it. Here's a full breakdown of what we found and why it matters for SecLists specifically: Finding 1: RGS-008 (High) - Secrets Directly Interpolated in run Blocks Files: These workflows use The fix moves the secret into an Finding 2: RGS-007 (Medium) - Unpinned Third-Party Actions Files: 6 All six reference This is exactly how the tj-actions/changed-files attack worked. The attacker force-pushed the version tag to a malicious commit, and every repo using that action executed attacker code silently. The fix pins each action to its full 40-character commit SHA. The original version tag is preserved as a comment so you can still see what version it corresponds to. If What could happen if left unfixed: SecLists is one of the most widely used security testing resources. If an attacker compromises The fixes in this PR are mechanical and preserve all existing behavior. You can review every change in the diff. Nothing changes functionally, it just closes the door on these attack vectors. Full details on the RGS classification system: https://github.com/Vigilant-LLC/runner-guard/tree/main/rules Happy to answer anything else. - Chris |
Cleaning up quoting on extracted env var references for consistency and correctness.
Security: Harden GitHub Actions workflows
Hey, I found some CI/CD security issues in this repo's GitHub Actions workflows. These are the same vulnerability classes that were exploited in the tj-actions/changed-files supply chain attack. I've been reviewing repos that are affected and submitting fixes where I can.
This PR applies mechanical fixes and flags anything else that needs a manual look. Happy to answer any questions.
Fixes applied
.github/workflows/readme-updater.yml.github/workflows/remote-wordlists-updater.yml.github/workflows/wordlist-updater_api-endpoints-res.yml.github/workflows/wordlist-updater_awesome-list-of-secrets-in-environment-variables.yml.github/workflows/wordlist-updater_combined_directories.yml.github/workflows/wordlist-updater_combined_words.yml.github/workflows/wordlist-updater_default-passwords.yml.github/workflows/wordlist-updater_fuzzing_etc_files.ymlAdditional findings (manual review recommended)
No additional findings beyond the fixes applied above.
Why this matters
GitHub Actions workflows that use untrusted input in
run:blocks or reference unpinned third-party actions are vulnerable to code injection and supply chain attacks. These are the same vulnerability classes exploited in the tj-actions/changed-files incident which compromised CI secrets across thousands of repositories.How to verify
Review the diff, each change is mechanical and preserves workflow behavior:
${{ }}expressions fromrun:blocks intoenv:mappings, preventing shell injectionIf this PR is not welcome, just close it and I won't send another.