feat: scan jobs.<job>.uses when checking workflow actions#57
Merged
joshjohanning merged 2 commits intoApr 10, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR closes a workflow-scanning gap by extracting uses: references defined at the job level (jobs.<job>.uses) in addition to step-level uses, ensuring reusable workflows are included in immutable reference checks.
Changes:
- Added a shared
addParsedAction()helper to centralize parsing/metadata attachment forusesreferences. - Updated workflow extraction to include
jobs.<job>.uses(reusable workflows) alongside stepuses. - Bumped package version and expanded Jest coverage to validate reusable-workflow extraction behavior.
Show a summary per file
| File | Description |
|---|---|
src/index.js |
Refactors action extraction and adds scanning for jobs.<job>.uses reusable workflow references. |
__tests__/index.test.js |
Adds/updates tests to assert reusable workflows are extracted correctly (including jobs with only uses). |
package.json |
Bumps version to reflect behavior change. |
package-lock.json |
Syncs lockfile version metadata with the package bump. |
badges/coverage.svg |
Updates coverage badge after test additions. |
Copilot's findings
- Files reviewed: 3/5 changed files
- Comments generated: 0
jobs.<job>.uses when checking workflow actionsjobs.<job>.uses when checking workflow actions
📦 Draft Release CreatedA draft release v2.2.0 has been created for this PR. Next Steps
|
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.
This change scans
jobs.<job>.usesreferences in addition to step-levelusesreferences.Without this, reusable workflows referenced at the job level are skipped, which leaves a coverage gap for third-party action checks.
Test workflows:
target-*.ymlfrom Wuodan/ensure-immutable-actions-testValidation run with this PR branch: