-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f69524
commit ca5bd0d
Showing
6 changed files
with
223 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
checks/testdata/.github/workflows/github-workflow-dangerous-pattern-secret-action-args.yml
This file contains 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,17 @@ | ||
name: Close issue on Jira | ||
|
||
on: | ||
pull_request | ||
|
||
jobs: | ||
test1: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
name: Use in env toJson | ||
|
||
- name: Use in with toJson | ||
uses: some/action@main | ||
with: | ||
some-args: ${{ toJson(secrets.SE12) }} | ||
|
60 changes: 60 additions & 0 deletions
60
checks/testdata/.github/workflows/github-workflow-dangerous-pattern-secret-all-checkout.yml
This file contains 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,60 @@ | ||
name: Close issue on Jira | ||
|
||
on: | ||
pull_request | ||
|
||
env: | ||
BLA: ${{ secrets.SE00 }} | ||
|
||
jobs: | ||
test1: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
name: Use in env toJson | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(secrets.SE11) }} | ||
#run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in with toJson | ||
uses: some/action@main | ||
with: | ||
some-args: ${{ toJson(secrets.SE12) }} | ||
#run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in run toJson | ||
run: echo "${{ toJson(secrets.SE13) }}" | ||
test2: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use in env toJson | ||
env: | ||
GITHUB_CONTEXT: ${{ secrets.SE21 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in with toJson | ||
uses: some/[email protected] | ||
with: | ||
some-args: ${{ secrets.SE22 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in run toJson | ||
run: echo "${{ secrets.SE23 }}" | ||
test3: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use in env toJson | ||
env: | ||
GITHUB_CONTEXT: ${{ secrets.SE31 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in with toJson | ||
uses: some/[email protected] | ||
with: | ||
some-args: ${{ secrets.SE32 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in run toJson | ||
run: echo "${{ secrets.SE33 }}" | ||
|
||
- uses: actions/[email protected] |
52 changes: 52 additions & 0 deletions
52
...s/testdata/.github/workflows/github-workflow-dangerous-pattern-secret-env-no-checkout.yml
This file contains 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,52 @@ | ||
name: Close issue on Jira | ||
|
||
on: | ||
pull_request | ||
|
||
env: | ||
BLA: ${{ secrets.SE00 }} | ||
|
||
jobs: | ||
test1: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use in with toJson | ||
uses: some/action@main | ||
with: | ||
some-args: ${{ toJson(secrets.SE12) }} | ||
|
||
- name: Use in run toJson | ||
run: echo "${{ toJson(secrets.SE13) }}" | ||
test2: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use in env toJson | ||
env: | ||
GITHUB_CONTEXT: ${{ secrets.SE21 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in with toJson | ||
uses: some/[email protected] | ||
with: | ||
some-args: ${{ secrets.SE22 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in run toJson | ||
run: echo "${{ secrets.SE23 }}" | ||
test3: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use in env toJson | ||
env: | ||
GITHUB_CONTEXT: ${{ secrets.SE31 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in with toJson | ||
uses: some/[email protected] | ||
with: | ||
some-args: ${{ secrets.SE32 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in run toJson | ||
run: echo "${{ secrets.SE33 }}" | ||
|
22 changes: 22 additions & 0 deletions
22
checks/testdata/.github/workflows/github-workflow-dangerous-pattern-secret-env.yml
This file contains 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,22 @@ | ||
name: Close issue on Jira | ||
|
||
on: | ||
pull_request | ||
|
||
jobs: | ||
test1: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
name: Use in env toJson | ||
|
||
- name: Use in with toJson | ||
env: | ||
GITHUB_CONTEXT: ${{ secrets.SE21 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in with toJson | ||
uses: some/[email protected] | ||
env: | ||
GITHUB_CONTEXT: ${{ secrets.SE22 }} | ||
run: echo "$GITHUB_CONTEXT" |
60 changes: 60 additions & 0 deletions
60
...s/testdata/.github/workflows/github-workflow-dangerous-pattern-secret-no-pull-request.yml
This file contains 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,60 @@ | ||
name: Close issue on Jira | ||
|
||
on: | ||
push | ||
|
||
env: | ||
BLA: ${{ secrets.SE00 }} | ||
|
||
jobs: | ||
test1: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
name: Use in env toJson | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(secrets.SE11) }} | ||
#run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in with toJson | ||
uses: some/action@main | ||
with: | ||
some-args: ${{ toJson(secrets.SE12) }} | ||
#run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in run toJson | ||
run: echo "${{ toJson(secrets.SE13) }}" | ||
test2: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use in env toJson | ||
env: | ||
GITHUB_CONTEXT: ${{ secrets.SE21 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in with toJson | ||
uses: some/[email protected] | ||
with: | ||
some-args: ${{ secrets.SE22 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in run toJson | ||
run: echo "${{ secrets.SE23 }}" | ||
test3: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use in env toJson | ||
env: | ||
GITHUB_CONTEXT: ${{ secrets.SE31 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in with toJson | ||
uses: some/[email protected] | ||
with: | ||
some-args: ${{ secrets.SE32 }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- name: Use in run toJson | ||
run: echo "${{ secrets.SE33 }}" | ||
|
||
- uses: actions/[email protected] |
12 changes: 12 additions & 0 deletions
12
checks/testdata/.github/workflows/github-workflow-dangerous-pattern-secret-run.yml
This file contains 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,12 @@ | ||
name: Close issue on Jira | ||
|
||
on: | ||
pull_request | ||
|
||
jobs: | ||
test1: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Use in run toJson | ||
run: echo "${{ toJson(secrets.SE13) }}" |