Skip to content

feat: scan jobs.<job>.uses when checking workflow actions#57

Merged
joshjohanning merged 2 commits into
joshjohanning:mainfrom
Wuodan:upstream-PR/scan-job-uses
Apr 10, 2026
Merged

feat: scan jobs.<job>.uses when checking workflow actions#57
joshjohanning merged 2 commits into
joshjohanning:mainfrom
Wuodan:upstream-PR/scan-job-uses

Conversation

@Wuodan

@Wuodan Wuodan commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

This change scans jobs.<job>.uses references in addition to step-level uses references.

Without this, reusable workflows referenced at the job level are skipped, which leaves a coverage gap for third-party action checks.

Test workflows:

Validation run with this PR branch:

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 for uses references.
  • Updated workflow extraction to include jobs.<job>.uses (reusable workflows) alongside step uses.
  • 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

@joshjohanning joshjohanning changed the title Scan jobs.<job>.uses when checking workflow actions feat: scan jobs.<job>.uses when checking workflow actions Apr 10, 2026
@joshjohanning joshjohanning merged commit 12aadbc into joshjohanning:main Apr 10, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

📦 Draft Release Created

A draft release v2.2.0 has been created for this PR.

🔗 View Draft Release

Next Steps

  • Review the release notes
  • Publish the release to make it permanent

This is an automated reminder from the publish-github-action workflow.

@Wuodan Wuodan deleted the upstream-PR/scan-job-uses branch April 19, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants