Skip to content

Conversation

henrymercer
Copy link
Contributor

@henrymercer henrymercer commented Sep 4, 2025

Add a baseline configuration and successfully extracted files query for the Actions extractor. This will populate file coverage information about Actions on the code scanning status page.

The baseline configuration depends on CLI changes that will be released in v2.23.1.

@github-actions github-actions bot added the Actions Analysis of GitHub Actions label Sep 4, 2025
Comment on lines +11 to +13
from File f
where exists(f.getRelativePath())
select f, ""

Check warning

Code scanning / CodeQL

Consistent alert message Warning

The actions/diagnostics/successfully-extracted-files query does not have the same alert message as cpp, rust, swift.
@henrymercer henrymercer marked this pull request as ready for review September 5, 2025 12:14
@henrymercer henrymercer requested a review from a team as a code owner September 5, 2025 12:14
@henrymercer henrymercer requested review from Copilot and mbg September 5, 2025 12:14
Copy link
Contributor

@Copilot Copilot AI left a comment

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 adds file coverage information for the Actions extractor to support the code scanning status page. The implementation includes baseline configuration for identifying Actions-related files and a diagnostic query to list successfully extracted files.

Key changes:

  • Added a diagnostic query to list extracted files for coverage reporting
  • Created baseline configuration scripts and JSON to define Actions file patterns
  • Updated extractor configuration to include YAML as an SCC language

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
actions/ql/src/Diagnostics/SuccessfullyExtractedFiles.ql New diagnostic query to list all extracted files for coverage information
actions/extractor/tools/configure-baseline.sh Shell script to output baseline configuration for Unix systems
actions/extractor/tools/configure-baseline.cmd Batch script to output baseline configuration for Windows systems
actions/extractor/tools/baseline-config.json JSON configuration defining file patterns for Actions workflows and action files
actions/extractor/codeql-extractor.yml Updated to include YAML as an SCC language for file coverage
actions/ql/integration-tests/query-suite/*.expected Updated test expectations to include the new diagnostic query

mbg
mbg previously approved these changes Sep 5, 2025
Copy link
Member

@mbg mbg left a comment

Choose a reason for hiding this comment

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

Looks good to me! One question to improve my understanding and one optional suggestion for documentation purposes.

Comment on lines +11 to +12
scc_languages:
- YAML
Copy link
Member

Choose a reason for hiding this comment

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

I can see that this is now consistent with other languages. What effect does adding this have?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This tells scc to pick up files marked as YAML when CodeQL scans for the baseline set of files. These are then further filtered down by the configure baseline script.

@@ -8,7 +8,8 @@ build_modes:
- none
file_coverage_languages: []
github_api_languages: []
Copy link
Member

Choose a reason for hiding this comment

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

Is it worth putting a comment here that actions isn't its own language as far as linguist/the API is concerned and therefore not listed?

@henrymercer henrymercer requested a review from mbg September 5, 2025 14:00
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants