feat: add paths option to CodeQL action and security-scan workflow#102
Draft
Mrtenz wants to merge 2 commits into
Draft
feat: add paths option to CodeQL action and security-scan workflow#102Mrtenz wants to merge 2 commits into
paths option to CodeQL action and security-scan workflow#102Mrtenz wants to merge 2 commits into
Conversation
Adds an optional `paths` input (newline-delimited) that maps to the CodeQL `paths:` config option, restricting analysis to only the listed paths. Mirrors the existing `paths_ignored` input. Also corrects the `paths_ignored` description from "Comma delimited" to "Newline-delimited" to match the actual parsing behaviour.
Adds a `paths` workflow_call input to security-scan.yml and forwards it to the codeql-action step, so callers can restrict CodeQL analysis to specific paths end-to-end.
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.
Summary
pathsinput topackages/codeql-action(newline-delimited). When set, CodeQL restricts analysis to only those paths — the complement of the existingpaths-ignoreoption.pathsinput to.github/workflows/security-scan.ymland forwards it through to thecodeql-actionstep, so callers can use it end-to-end.paths_ignoredinput description, which said "Comma delimited" but the implementation splits on newlines.Test plan
NODE_OPTIONS=--experimental-vm-modules npx jest)paths: src/only analyses files undersrc/