Skip to content

Commit 1b30847

Browse files
authored
Merge branch 'main' into rust-rusqlite
2 parents 3e38867 + 9eeae71 commit 1b30847

File tree

70 files changed

+1575
-144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1575
-144
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: feature
3+
---
4+
* The "Unpinned tag for a non-immutable Action in workflow" query (`actions/unpinned-tag`) now supports expanding the trusted action owner list using data extensions (`extensible: trustedActionsOwnerDataModel`). If you trust an Action publisher, you can include the owner name/organization in a model pack to add it to the allow list for this query. This addition will prevent security alerts when using unpinned tags for Actions published by that owner. For more information on creating a model pack, see [Creating a CodeQL Model Pack](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).

actions/ql/lib/codeql/actions/config/Config.qll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ predicate vulnerableActionsDataModel(
126126
*/
127127
predicate immutableActionsDataModel(string action) { Extensions::immutableActionsDataModel(action) }
128128

129+
/**
130+
* MaD models for trusted actions owners
131+
* Fields:
132+
* - owner: owner name
133+
*/
134+
predicate trustedActionsOwnerDataModel(string owner) {
135+
Extensions::trustedActionsOwnerDataModel(owner)
136+
}
137+
129138
/**
130139
* MaD models for untrusted git commands
131140
* Fields:

actions/ql/lib/codeql/actions/config/ConfigExtensions.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ extensible predicate vulnerableActionsDataModel(
6363
*/
6464
extensible predicate immutableActionsDataModel(string action);
6565

66+
/**
67+
* Holds for trusted Actions owners.
68+
*/
69+
extensible predicate trustedActionsOwnerDataModel(string owner);
70+
6671
/**
6772
* Holds for git commands that may introduce untrusted data when called on an attacker controlled branch.
6873
*/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extensions:
2+
- addsTo:
3+
pack: codeql/actions-all
4+
extensible: trustedActionsOwnerDataModel
5+
data:
6+
- ["actions"]
7+
- ["github"]
8+
- ["advanced-security"]

actions/ql/src/Security/CWE-077/EnvPathInjectionMedium.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
* @name PATH Enviroment Variable built from user-controlled sources
33
* @description Building the PATH environment variable from user-controlled sources may alter the execution of following system commands
44
* @kind path-problem
5-
* @problem.severity warning
5+
* @problem.severity error
66
* @security-severity 5.0
7-
* @precision high
7+
* @precision medium
88
* @id actions/envpath-injection/medium
99
* @tags actions
1010
* security

actions/ql/src/Security/CWE-077/EnvVarInjectionMedium.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
* @name Enviroment Variable built from user-controlled sources
33
* @description Building an environment variable from user-controlled sources may alter the execution of following system commands
44
* @kind path-problem
5-
* @problem.severity warning
5+
* @problem.severity error
66
* @security-severity 5.0
7-
* @precision high
7+
* @precision medium
88
* @id actions/envvar-injection/medium
99
* @tags actions
1010
* security

actions/ql/src/Security/CWE-275/MissingActionsPermissions.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
* @description Workflows should contain permissions to provide a clear understanding has permissions to run the workflow.
44
* @kind problem
55
* @security-severity 5.0
6-
* @problem.severity recommendation
6+
* @problem.severity warning
77
* @precision high
88
* @id actions/missing-workflow-permissions
99
* @tags actions
1010
* maintainability
11+
* security
1112
* external/cwe/cwe-275
1213
*/
1314

actions/ql/src/Security/CWE-312/ExcessiveSecretsExposure.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* @name Excessive Secrets Exposure
33
* @description All organization and repository secrets are passed to the workflow runner.
44
* @kind problem
5-
* @problem.severity recommendation
5+
* @precision high
6+
* @problem.severity warning
67
* @id actions/excessive-secrets-exposure
78
* @tags actions
89
* security

actions/ql/src/Security/CWE-829/ArtifactPoisoningMedium.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* @name Artifact poisoning
33
* @description An attacker may be able to poison the workflow's artifacts and influence on consequent steps.
44
* @kind path-problem
5-
* @problem.severity warning
6-
* @precision high
5+
* @problem.severity error
6+
* @precision medium
77
* @security-severity 5.0
88
* @id actions/artifact-poisoning/medium
99
* @tags actions

actions/ql/src/Security/CWE-829/UnpinnedActionsTag.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ Pinning an action to a full length commit SHA is currently the only way to use a
2424
2525
## References
2626
27-
- [Using third-party actions](https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions)
27+
- [Using third-party actions](https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions)

0 commit comments

Comments
 (0)