Skip to content

Add actions.lock extraction - #22487

Merged
hvitved merged 2 commits into
mainfrom
hvitved-actions-lock-extraction
Sep 2, 2026
Merged

Add actions.lock extraction#22487
hvitved merged 2 commits into
mainfrom
hvitved-actions-lock-extraction

Conversation

@hvitved

@hvitvedhvitved commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

GitHub Actions databases currently skip actions.lock, preventing queries from inspecting pinned action versions recorded in lockfiles.

This change teaches the JavaScript extractor used by the Actions extractor to classify .lock files as YAML. The Actions path filters limit extraction to actions.lock, while the focused ActionsLock QL class exposes those documents to queries. A normal Actions QL extraction test verifies the lockfile is available.

@github-actionsgithub-actionsBot added documentation Actions Analysis of GitHub Actions JS labels Sep 2, 2026
@hvitved
hvitvedforce-pushed the hvitved-actions-lock-extraction branch 3 times, most recently from 27db0c5 to f929753CompareSeptember 2, 2026 08:32
Teach the JavaScript extractor to classify .lock files as YAML while limiting default autobuild extraction to explicitly included paths. Expose Actions lockfiles through the ActionsLock QL class and cover extraction with QL and database-creation integration tests.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4994bb27-c5ca-47e9-b082-cfc1ca244e86
@hvitved
hvitvedforce-pushed the hvitved-actions-lock-extraction branch from f929753 to 2377214CompareSeptember 2, 2026 08:44
@hvitved
hvitved marked this pull request as ready for review September 2, 2026 11:56
@hvitved
hvitved requested review from a team as code ownersSeptember 2, 2026 11:56
CopilotAI balanced review requested due to automatic review settings September 2, 2026 11:56
@hvitved
hvitved requested a review from a team as a code ownerSeptember 2, 2026 11:56
@hvitved
hvitved requested a review from asgerfSeptember 2, 2026 11:56

CopilotAI 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.

Copilot review overview

🟡 Changes recommended

The baseline path configuration still filters out actions.lock during normal Actions extraction.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 Medium severity

New issues introduced by this change (1)
SeverityFinding
Medium severityactions/​extractor/​tools/​autobuild.shconfigure-baseline still returns baseline-config.json without **/actions.lock. Those baseline…
What changed in this PR

Adds actions.lock extraction and a QL abstraction for Actions databases.

Changes:

  • Treats .lock files as YAML while excluding them from default JavaScript extraction.
  • Includes actions.lock in Actions extraction filters.
  • Adds ActionsLock, tests, fixtures, and release notes.
FileDescription
javascript/​extractor/​src/​com/​semmle/​js/​extractor/​FileExtractor.javaClassifies .lock as YAML.
javascript/​extractor/​src/​com/​semmle/​js/​extractor/​AutoBuild.javaExcludes lockfiles by default.
actions/​ql/​lib/​codeql/​actions/​Lock.qllDefines ActionsLock.
actions/​ql/​lib/​actions.qllExports lockfile support.
actions/​ql/​lib/​change-notes/​2026-09-01-actions-lock-yaml.mdDocuments the feature.
actions/​extractor/​tools/​autobuild.shIncludes Actions lockfiles on Unix.
actions/​extractor/​tools/​autobuild-impl.ps1Includes Actions lockfiles on Windows.
actions/​ql/​test/​library-tests/​actions-lock/​test.qlQueries extracted lockfiles.
actions/​ql/​test/​library-tests/​actions-lock/​test.expectedRecords expected query output.
actions/​ql/​test/​library-tests/​actions-lock/​optionsSelects the test lockfile.
actions/​ql/​test/​library-tests/​actions-lock/​actions.lockSupplies the library-test fixture.
actions/​ql/​test/​library-tests/​actions-lock/​.github/​workflows/​test.ymlSupplies workflow context.
actions/​ql/​integration-tests/​actions-lock/​test.pyTests normal database extraction.
actions/​ql/​integration-tests/​actions-lock/​src/​actions.lockSupplies the integration fixture.
actions/​ql/​integration-tests/​actions-lock/​src/​.github/​workflows/​test.ymlSupplies integration workflow context.
actions/​ql/​integration-tests/​actions-lock/​query/​qlpack.ymlConfigures the integration query pack.
actions/​ql/​integration-tests/​actions-lock/​query/​actions.qlChecks lockfile availability.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadactions/extractor/tools/autobuild.sh
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hvitved
hvitved merged commit 2d9252f into mainSep 2, 2026
29 checks passed
@hvitved
hvitved deleted the hvitved-actions-lock-extraction branch September 2, 2026 13:01
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ActionsAnalysis of GitHub ActionsdocumentationJS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@hvitved@asgerf