Add ci-doctor (GitHub Actions workflow auditor) to Code Scanning starters#3285
Open
depmedicdev-byte wants to merge 2 commits intoactions:mainfrom
Open
Add ci-doctor (GitHub Actions workflow auditor) to Code Scanning starters#3285depmedicdev-byte wants to merge 2 commits intoactions:mainfrom
depmedicdev-byte wants to merge 2 commits intoactions:mainfrom
Conversation
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.
Adds ci-doctor as a new Code Scanning starter workflow.
Per
CONTRIBUTING.md: "At this time we are only accepting new starter workflows for Code Scanning." This PR fits that scope.What ci-doctor is
ci-doctoris an MIT-licensed Node CLI that audits a repository's.github/workflows/*.ymlfiles for 14 cost, security, and reliability smells specific to GitHub Actions:permissions:blocks (default-write risk)concurrency:(wasted minutes on push-stacked runs)timeout-minutes:(runaway jobs that bill until the 6h cap)actions/checkout@v3,actions/setup-node@v3)cache:onsetup-node/setup-python(slow + expensive installs)pull_request_targettriggers withoutpaths:filterfetch-depth: 0where it isn't neededexpensiverunner labels (e.g.macos-13-xl) on jobs that don't need themfail-fast: truehiding real failuresretention-daysSource, tests, and docs: https://github.com/depmedicdev-byte/ci-doctor
npm: https://www.npmjs.com/package/ci-doctor (1.5k+ weekly downloads on day 1)
Why a starter (not just an action)
Almost every public repo I've scanned (n=20 popular OSS projects, 229 workflows, 944 findings) has at least 3 of these smells. The findings are real, actionable, and have measurable $$ + security impact. They're also entirely workflow-YAML-level, so a Code Scanning starter that wires up the SARIF -> Security tab path is the lowest-friction way to surface them to the people who can fix them.
SARIF
ci-doctor has shipped SARIF 2.1.0 output (
--sarif) since v0.4.0. The starter uses it directly and uploads viagithub/codeql-action/upload-sarif@v3, matching the pattern used byeslint.yml,devskim.yml, etc.Compliance with the previous-guidelines list
ci-doctor) is invoked vianpxfrom the public npm registry, not via auses:ref - so the SHA-pinning rule for third-party actions does not apply here. The onlyuses:refs areactions/checkout@v4andgithub/codeql-action/upload-sarif@v3, both first-party.Happy to revise iconName, categories, or the wording. Thanks for considering!