forked from ossf/scorecard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ossf#2 from joycebrum/test/initial-tests-for-dw-fix
Signed-off-by: Pedro Kaj Kjellerup Nacht <[email protected]>
- Loading branch information
1 parent
20f37d6
commit 9e41183
Showing
34 changed files
with
1,469 additions
and
5 deletions.
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
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
42 changes: 42 additions & 0 deletions
42
probes/hasDangerousWorkflowScriptInjection/patch/testdata/allKindsOfUserInput.yaml
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,42 @@ | ||
# Copyright 2024 OpenSSF Scorecard Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
on: | ||
issue: | ||
|
||
jobs: | ||
pretty-generic-job: | ||
steps: | ||
- name: everything everywhere in on job | ||
run: | | ||
echo "${{ github.event.comment.body }}" | ||
echo "${{ github.event.commit_comment.comment.body }}" | ||
echo "${{ github.event.commits[0].message }}" | ||
echo "${{ github.event.commits[0].author.email }}" | ||
echo "${{ github.event.commits[0].author.name }}" | ||
echo "${{ github.event.discussion.body }}" | ||
echo "${{ github.event.discussion.title }}" | ||
echo "${{ github.event.head_commit.message }}" | ||
echo "${{ github.event.head_commit.author.email }}" | ||
echo "${{ github.event.head_commit.author.name }}" | ||
echo "${{ github.event.issue.title }}" | ||
echo "${{ github.event.issue.body }}" | ||
echo "${{ github.event.issue_comment.comment.body }}" | ||
echo "${{ github.event.pages[0].page_name }}" | ||
echo "${{ github.event.pull_request.body }}" | ||
echo "${{ github.event.pull_request.title }}" | ||
echo "${{ github.event.pull_request.head.ref }}" | ||
echo "${{ github.event.pull_request.head.label }}" | ||
echo "${{ github.event.pull_request.head.repo.default_branch }}" | ||
echo "${{ github.event.review.body }}" | ||
echo "${{ github.head_ref }}" |
67 changes: 67 additions & 0 deletions
67
probes/hasDangerousWorkflowScriptInjection/patch/testdata/allKindsOfUserInput_fixed.yaml
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,67 @@ | ||
# Copyright 2021 OpenSSF Scorecard Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
on: | ||
issue: | ||
|
||
env: | ||
COMMENT_BODY: "${{ github.event.comment.body }}" | ||
COMMIT_COMMENT: "${{ github.event.commit_comment.comment.body }}" | ||
COMMIT_MESSAGE: "${{ github.event.commits[0].message }}" | ||
COMMIT_AUTHOR_EMAIL: "${{ github.event.commits[0].author.email }}" | ||
COMMIT_AUTHOR_NAME: "${{ github.event.commits[0].author.name }}" | ||
DISCUSSION_BODY: ${{ github.event.discussion.body }} | ||
DISCUSSION_TITLE: ${{ github.event.discussion.title }} | ||
FORK_FORKEE_NAME: ${{ github.event.fork.forkee.name }} | ||
HEAD_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}" | ||
HEAD_COMMIT_AUTHOR_EMAIL: "${{ github.event.head_commit.author.email }}" | ||
HEAD_COMMIT_AUTHOR_NAME: "${{ github.event.head_commit.author.name }}" | ||
ISSUE_TITLE: "${{ github.event.issue.title }}" | ||
ISSUE_BODY: "${{ github.event.issue.body }}" | ||
ISSUE_COMMENT_COMMENT: "${{ github.event.issue_comment.comment.body }}" | ||
PAGE_NAME: "${{ github.event.pages[0].page_name }}" | ||
PR_BODY: "${{ github.event.pull_request.body }}" | ||
PR_TITLE: "${{ github.event.pull_request.title }}" | ||
PR_HEAD_REF: "${{ github.event.pull_request.head.ref }}" | ||
PR_HEAD_LABEL: "${{ github.event.pull_request.head.label }}" | ||
REPO_PR_DEFAULT_BRANCH: "${{ github.event.pull_request.head.repo.default_branch }}" | ||
REVIEW_BODY: "${{ github.event.review.body }}" | ||
HEAD_REF: "${{ github.head_ref }}" | ||
|
||
jobs: | ||
pretty-generic-job: | ||
steps: | ||
- name: everything everywhere in on job | ||
run: | | ||
echo "$COMMENT_BODY" | ||
echo "$COMMIT_COMMENT" | ||
echo "$COMMIT_MESSAGE" | ||
echo "$COMMIT_AUTHOR_EMAIL" | ||
echo "$COMMIT_AUTHOR_NAME" | ||
echo "$DISCUSSION_BODY" | ||
echo "$DISCUSSION_TITLE" | ||
echo "$FORK_FORKEE_NAME" | ||
echo "$HEAD_COMMIT_MESSAGE" | ||
echo "$HEAD_COMMIT_AUTHOR_EMAIL" | ||
echo "$HEAD_COMMIT_AUTHOR_NAME" | ||
echo "$ISSUE_TITLE" | ||
echo "$ISSUE_BODY" | ||
echo "$ISSUE_COMMENT_COMMENT" | ||
echo "$PAGE_NAME" | ||
echo "$PR_BODY" | ||
echo "$PR_TITLE" | ||
echo "$PR_HEAD_REF" | ||
echo "$PR_HEAD_LABEL" | ||
echo "$REPO_PR_DEFAULT_BRANCH" | ||
echo "$REVIEW_BODY" | ||
echo "$HEAD_REF" |
36 changes: 36 additions & 0 deletions
36
probes/hasDangerousWorkflowScriptInjection/patch/testdata/crazyButValidIndentation.yaml
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 @@ | ||
# Copyright 2024 OpenSSF Scorecard Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
# I make no sense | ||
|
||
# not really | ||
|
||
|
||
# some extra tabs here to check if they're kept | ||
|
||
- name: Check title | ||
run: | | ||
if [[ ! "${{ github.event.issue.title }}" =~ ^.*:\ .*$ ]]; then | ||
echo "Bad issue title" | ||
exit 1 | ||
fi |
39 changes: 39 additions & 0 deletions
39
...es/hasDangerousWorkflowScriptInjection/patch/testdata/crazyButValidIndentation_fixed.yaml
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,39 @@ | ||
# Copyright 2024 OpenSSF Scorecard Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
on: [pull_request] | ||
|
||
env: | ||
ISSUE_TITLE: ${{ github.event.issue.title }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
# I make no sense | ||
|
||
# not really | ||
|
||
|
||
# some extra tabs here to check if they're kept | ||
|
||
- name: Check title | ||
run: | | ||
if [[ ! "$ISSUE_TITLE" =~ ^.*:\ .*$ ]]; then | ||
echo "Bad issue title" | ||
exit 1 | ||
fi |
Oops, something went wrong.