-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Adding comprehensive docs for customizing actions/unpinned-tag query
#19427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
actions/ql/src/Security/CWE-829/UnpinnedActionsTag-CUSTOMIZING.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| ### Configuration | ||
|
|
||
| If there is an Action publisher that you trust, you can include the owner name/organization in a data extension model pack to add it to the allow list for this query. Adding owners to this list will prevent security alerts when using unpinned tags for Actions published by that owner. | ||
|
|
||
| #### Example | ||
|
|
||
| To allow any Action from the publisher `octodemo`, such as `octodemo/3rd-party-action`, follow these steps: | ||
|
|
||
| 1. Create a data extension file `/models/trusted-owner.model.yml` with the following content: | ||
|
|
||
| ```yaml | ||
| extensions: | ||
| - addsTo: | ||
| pack: codeql/actions-all | ||
| extensible: trustedActionsOwnerDataModel | ||
| data: | ||
| - ["octodemo"] | ||
| ``` | ||
| 2. Create a model pack file `/codeql-pack.yml` with the following content: | ||
|
|
||
| ```yaml | ||
| name: my-org/actions-extensions-model-pack | ||
| version: 0.0.0 | ||
| library: true | ||
| extensionTargets: | ||
| codeql/actions-all: '*' | ||
| dataExtensions: | ||
| - models/**/*.yml | ||
| ``` | ||
|
|
||
| 3. Ensure that the model pack is included in your CodeQL analysis. | ||
|
|
||
| By following these steps, you will add `octodemo` to the list of trusted Action publishers, and the query will no longer generate security alerts for unpinned tags from this publisher. | ||
|
|
||
| ## References | ||
| - [Extending CodeQL coverage with CodeQL model packs in default setup](https://docs.github.com/en/code-security/code-scanning/managing-your-code-scanning-configuration/editing-your-configuration-of-default-setup#extending-codeql-coverage-with-codeql-model-packs-in-default-setup) | ||
| - [Creating and working with CodeQL packs](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/creating-and-working-with-codeql-packs#creating-a-codeql-model-pack) | ||
| - [Customizing library models for GitHub Actions](https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-actions/) | ||
felickz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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
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.
Uh oh!
There was an error while loading. Please reload this page.