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

@hvitved hvitved 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-actions github-actions Bot added documentation Actions Analysis of GitHub Actions JS labels Sep 2, 2026
@hvitved
hvitved force-pushed the hvitved-actions-lock-extraction branch 3 times, most recently from 27db0c5 to f929753 Compare September 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
hvitved force-pushed the hvitved-actions-lock-extraction branch from f929753 to 2377214 Compare September 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 owners September 2, 2026 11:56
Copilot AI balanced review requested due to automatic review settings September 2, 2026 11:56
@hvitved
hvitved requested a review from a team as a code owner September 2, 2026 11:56
@hvitved
hvitved requested a review from asgerf September 2, 2026 11:56

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.

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)
Severity Finding
Medium severity actions/​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.
File Description
javascript/​extractor/​src/​com/​semmle/​js/​extractor/​FileExtractor.java Classifies .lock as YAML.
javascript/​extractor/​src/​com/​semmle/​js/​extractor/​AutoBuild.java Excludes lockfiles by default.
actions/​ql/​lib/​codeql/​actions/​Lock.qll Defines ActionsLock.
actions/​ql/​lib/​actions.qll Exports lockfile support.
actions/​ql/​lib/​change-notes/​2026-09-01-actions-lock-yaml.md Documents the feature.
actions/​extractor/​tools/​autobuild.sh Includes Actions lockfiles on Unix.
actions/​extractor/​tools/​autobuild-impl.ps1 Includes Actions lockfiles on Windows.
actions/​ql/​test/​library-tests/​actions-lock/​test.ql Queries extracted lockfiles.
actions/​ql/​test/​library-tests/​actions-lock/​test.expected Records expected query output.
actions/​ql/​test/​library-tests/​actions-lock/​options Selects the test lockfile.
actions/​ql/​test/​library-tests/​actions-lock/​actions.lock Supplies the library-test fixture.
actions/​ql/​test/​library-tests/​actions-lock/​.github/​workflows/​test.yml Supplies workflow context.
actions/​ql/​integration-tests/​actions-lock/​test.py Tests normal database extraction.
actions/​ql/​integration-tests/​actions-lock/​src/​actions.lock Supplies the integration fixture.
actions/​ql/​integration-tests/​actions-lock/​src/​.github/​workflows/​test.yml Supplies integration workflow context.
actions/​ql/​integration-tests/​actions-lock/​query/​qlpack.yml Configures the integration query pack.
actions/​ql/​integration-tests/​actions-lock/​query/​actions.ql Checks lockfile availability.

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

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

Labels

Actions Analysis of GitHub Actions documentation JS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants