Skip to content

Commit 029cf57

Browse files
author
Dilan Bhalla
committed
Revert "Merge pull request #257 from microsoft/jb1/reapply-22.1-tmp"
This reverts commit 6d496ee, reversing changes made to 866977b.
1 parent f8bdfa4 commit 029cf57

File tree

3,052 files changed

+155405
-68683
lines changed

Some content is hidden

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

3,052 files changed

+155405
-68683
lines changed

.github/copilot-instructions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
When reviewing code:
2+
* do not review changes in files with `.expected` extension (they are automatically ensured to be correct).
3+
* in `.ql` and `.qll` files, do not try to review the code itself as you don't understand the programming language
4+
well enough to make comments in these languages. You can still check for typos or comment improvements.

.github/workflows/check-change-note.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ on:
1616
- "shared/**/*.qll"
1717
- "!**/experimental/**"
1818
- "!ql/**"
19-
- "!rust/**"
2019
- ".github/workflows/check-change-note.yml"
2120

2221
jobs:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Check overlay annotations
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'rc/*'
8+
pull_request:
9+
branches:
10+
- main
11+
- 'rc/*'
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
sync:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Check overlay annotations
22+
run: python config/add-overlay-annotations.py --check java
23+

.github/workflows/ql-for-ql-dataset_measure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Create database
5454
run: |
5555
"${CODEQL}" database create \
56-
--search-path "${{ github.workspace }}"
56+
--search-path "${{ github.workspace }}" \
5757
--threads 4 \
5858
--language ql --source-root "${{ github.workspace }}/repo" \
5959
"${{ runner.temp }}/database"

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

actions/ql/lib/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/actions-all
2-
version: 0.4.12
2+
version: 0.4.13-dev
33
library: true
44
warnOnImplicitThis: true
55
dependencies:

actions/ql/src/Security/CWE-077/EnvPathInjectionCritical.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Environment Path Injection
2-
3-
## Description
1+
## Overview
42

53
GitHub Actions allow to define the system PATH variable by writing to a file pointed to by the `GITHUB_PATH` environment variable. Writing to this file appends a directory to the system PATH variable and automatically makes it available to all subsequent actions in the current job.
64

@@ -12,11 +10,11 @@ echo "$HOME/.local/bin" >> $GITHUB_PATH
1210

1311
If an attacker can control the contents of the system PATH, they are able to influence what commands are run in subsequent steps of the same job.
1412

15-
## Recommendations
13+
## Recommendation
1614

1715
Do not allow untrusted data to influence the system PATH: Avoid using untrusted data sources (e.g., artifact content) to define the system PATH.
1816

19-
## Examples
17+
## Example
2018

2119
### Incorrect Usage
2220

@@ -36,4 +34,4 @@ If an attacker can manipulate the value being set, such as through artifact down
3634
3735
## References
3836
39-
- [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions)
37+
- GitHub Docs: [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions).

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Environment Path Injection
2-
3-
## Description
1+
## Overview
42

53
GitHub Actions allow to define the system PATH variable by writing to a file pointed to by the `GITHUB_PATH` environment variable. Writing to this file appends a directory to the system PATH variable and automatically makes it available to all subsequent actions in the current job.
64

@@ -12,11 +10,11 @@ echo "$HOME/.local/bin" >> $GITHUB_PATH
1210

1311
If an attacker can control the contents of the system PATH, they are able to influence what commands are run in subsequent steps of the same job.
1412

15-
## Recommendations
13+
## Recommendation
1614

1715
Do not allow untrusted data to influence the system PATH: Avoid using untrusted data sources (e.g., artifact content) to define the system PATH.
1816

19-
## Examples
17+
## Example
2018

2119
### Incorrect Usage
2220

@@ -36,4 +34,4 @@ If an attacker can manipulate the value being set, such as through artifact down
3634
3735
## References
3836
39-
- [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions)
37+
- GitHub Docs: [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions).

actions/ql/src/Security/CWE-077/EnvVarInjectionCritical.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Environment Variable Injection
2-
3-
## Description
1+
## Overview
42

53
GitHub Actions allow to define environment variables by writing to a file pointed to by the `GITHUB_ENV` environment variable:
64

@@ -37,7 +35,7 @@ steps:
3735

3836
If an attacker can control the values assigned to environment variables and there is no sanitization in place, the attacker will be able to inject additional variables by injecting new lines or `{delimiters}`.
3937

40-
## Recommendations
38+
## Recommendation
4139

4240
1. **Do not allow untrusted data to influence environment variables**:
4341

@@ -64,7 +62,7 @@ If an attacker can control the values assigned to environment variables and ther
6462
} >> "$GITHUB_ENV"
6563
```
6664

67-
## Examples
65+
## Example
6866

6967
### Example of Vulnerability
7068

@@ -113,5 +111,5 @@ An attacker is be able to run arbitrary code by injecting environment variables
113111
114112
## References
115113
116-
- [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions)
117-
- [GitHub Actions Exploitation: Repo Jacking and Environment Manipulation](https://www.synacktiv.com/publications/github-actions-exploitation-repo-jacking-and-environment-manipulation)
114+
- GitHub Docs: [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions).
115+
- Synacktiv: [GitHub Actions Exploitation: Repo Jacking and Environment Manipulation](https://www.synacktiv.com/publications/github-actions-exploitation-repo-jacking-and-environment-manipulation).

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Environment Variable Injection
2-
3-
## Description
1+
## Overview
42

53
GitHub Actions allow to define environment variables by writing to a file pointed to by the `GITHUB_ENV` environment variable:
64

@@ -37,7 +35,7 @@ steps:
3735

3836
If an attacker can control the values assigned to environment variables and there is no sanitization in place, the attacker will be able to inject additional variables by injecting new lines or `{delimiters}`.
3937

40-
## Recommendations
38+
## Recommendation
4139

4240
1. **Do not allow untrusted data to influence environment variables**:
4341

@@ -64,7 +62,7 @@ If an attacker can control the values assigned to environment variables and ther
6462
} >> "$GITHUB_ENV"
6563
```
6664

67-
## Examples
65+
## Example
6866

6967
### Example of Vulnerability
7068

@@ -113,5 +111,5 @@ An attacker would be able to run arbitrary code by injecting environment variabl
113111
114112
## References
115113
116-
- [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions)
117-
- [GitHub Actions Exploitation: Repo Jacking and Environment Manipulation](https://www.synacktiv.com/publications/github-actions-exploitation-repo-jacking-and-environment-manipulation)
114+
- GitHub Docs: [Workflow commands for GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions).
115+
- Synacktiv: [GitHub Actions Exploitation: Repo Jacking and Environment Manipulation](https://www.synacktiv.com/publications/github-actions-exploitation-repo-jacking-and-environment-manipulation).

0 commit comments

Comments
 (0)