-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Discard GitHub token in dangerous workflow check (#1772)
* Discard GitHub token in dangerous workflow check * missing files
- Loading branch information
1 parent
66b3d8c
commit 2bbbce7
Showing
4 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
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
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
36 changes: 36 additions & 0 deletions
36
checks/testdata/.github/workflows/github-workflow-dangerous-pattern-default-secret-pr.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,36 @@ | ||
name: Close issue on Jira | ||
|
||
on: | ||
pull_request | ||
|
||
env: | ||
BLA: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
test1: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
name: Use in env toJson | ||
|
||
- uses: some/[email protected] | ||
with: | ||
option: ${{ secrets.GITHUB_TOKEN }} | ||
name: Use secret in args | ||
|
||
- name: Use in with toJson | ||
env: | ||
GITHUB_CONTEXT: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
echo "$GITHUB_CONTEXT" | ||
echo "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Use in with toJson | ||
uses: some/[email protected] | ||
env: | ||
GITHUB_CONTEXT: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
echo "$GITHUB_CONTEXT" | ||
echo "${{ secrets.GITHUB_TOKEN }}" |
36 changes: 36 additions & 0 deletions
36
checks/testdata/.github/workflows/github-workflow-dangerous-pattern-default-secret-prt.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,36 @@ | ||
name: Close issue on Jira | ||
|
||
on: | ||
pull_request_target | ||
|
||
env: | ||
BLA: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
test1: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
name: Use in env toJson | ||
|
||
- uses: some/[email protected] | ||
with: | ||
option: ${{ secrets.GITHUB_TOKEN }} | ||
name: Use secret in args | ||
|
||
- name: Use in with toJson | ||
env: | ||
GITHUB_CONTEXT: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
echo "$GITHUB_CONTEXT" | ||
echo "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Use in with toJson | ||
uses: some/[email protected] | ||
env: | ||
GITHUB_CONTEXT: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
echo "$GITHUB_CONTEXT" | ||
echo "${{ secrets.GITHUB_TOKEN }}" |