claws-scan 0.7.3 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.policy.yml +3 -0
- data/CONTRIBUTING.md +40 -0
- data/Gemfile.lock +1 -1
- data/README.md +5 -2
- data/lib/claws/rule/unpinned_action.rb +1 -3
- data/lib/claws/version.rb +1 -1
- metadata +5 -18
- data/corpus/automerge_via_action.yml +0 -28
- data/corpus/automerge_via_cli.yml +0 -14
- data/corpus/build-docker-image-run-drc-for-cell-gds-using-magic.yml +0 -170
- data/corpus/cmd.yml +0 -14
- data/corpus/container.yml +0 -19
- data/corpus/container_docker.yml +0 -9
- data/corpus/dispatch_command_injection.yml +0 -17
- data/corpus/inherit_secrets.yml +0 -20
- data/corpus/nameless.yml +0 -11
- data/corpus/permissions.yml +0 -19
- data/corpus/ruby.yml +0 -12
- data/corpus/shellcheck.yml +0 -12
- data/corpus/unsafe_checkout_code_execution.yml +0 -21
- data/corpus/unsafe_checkout_token_leak.yml +0 -33
- data/corpus/unscoped_secrets.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e35f096c235fba21325d4385fd83ac9c7ca2466ca1e82e72311f3079dcd02276
|
4
|
+
data.tar.gz: c5a5f8206a0f047bf0b49b31ba9976a8c41ad5c3476c8167683140298efcc4a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f58f8c09db0ccb0b3c1df00f09710bad07bcc691cb4b41681d5d6e2ff62e157c45742505aa9469d2e6b81d35b6a8ce020863019be057f7b36a780ddf314e65a
|
7
|
+
data.tar.gz: 0161dad252e79ee9e79d85eb7af21d2eccf1ce5ae6b82d415fcd4a6d060989e5245c57593ca82ad2b7401716ecf5edbd89b3cb9d02bde036e72dcec3d5339ee7
|
data/.policy.yml
ADDED
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# Contributing to Claws
|
2
|
+
|
3
|
+
Thank you for your interest in contributing to this project! We welcome contributions of all kinds: issues, bug reports, new rules, and pull requests. For just about everything, opening an issue is fine. Opening a pull request would be even better.
|
4
|
+
|
5
|
+
## 🔮 Before You Start
|
6
|
+
|
7
|
+
Please [search existing issues](https://github.com/betterment/claws/issues) before opening a new one. This helps avoid duplicates and ensures discussions stay organized.
|
8
|
+
|
9
|
+
## 🐛 Reporting Bugs
|
10
|
+
|
11
|
+
If you encounter a bug, please [open an issue](https://github.com/betterment/claws/issues) and include:
|
12
|
+
|
13
|
+
- A clear description of the problem
|
14
|
+
- Steps to reproduce the bug
|
15
|
+
- Your configuration file (if applicable)
|
16
|
+
- A **minimal reproducible example**
|
17
|
+
|
18
|
+
## 💡 Suggesting or Adding a New Rule
|
19
|
+
|
20
|
+
Have an idea for a new rule? Great! You can:
|
21
|
+
|
22
|
+
- [Open an issue](https://github.com/betterment/claws/issues) to discuss it, or
|
23
|
+
- Jump straight in with a [pull request](https://github.com/betterment/claws/pulls)
|
24
|
+
|
25
|
+
Please explain the motivation behind the rule, its intended use cases, and provide examples if possible.
|
26
|
+
|
27
|
+
## 🚀 Submitting Pull Requests
|
28
|
+
|
29
|
+
We love pull requests!! Before submitting:
|
30
|
+
|
31
|
+
1. Ensure your code follows the existing style and passes all tests.
|
32
|
+
2. Include tests for any new features or rules. Every rule requires a test.
|
33
|
+
3. Update documentation if needed.
|
34
|
+
4. Link the related issue in the PR description (if applicable).
|
35
|
+
|
36
|
+
Thank you for helping make this project better!
|
37
|
+
|
38
|
+
## 🔐 Reporting Security Issues
|
39
|
+
|
40
|
+
If you discover a security vulnerability, **please do not open a public issue**. Instead, refer to our [responsible disclosure guidelines](https://www.betterment.com/legal/security#disclosure) for how to report it.
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -488,7 +488,7 @@ Tips:
|
|
488
488
|
* eval a test expression: e 'expression'
|
489
489
|
* ^D to exit
|
490
490
|
|
491
|
-
From: /Users/omar/src/
|
491
|
+
From: /Users/omar/src/claws/lib/application.rb:194 Application#enter_debug:
|
492
492
|
|
493
493
|
184: def enter_debug(result:, expression:, values:)
|
494
494
|
185: @debug_values = values
|
@@ -553,5 +553,8 @@ Since this rule is functioning as desired, we don't need to dig any further. But
|
|
553
553
|
|
554
554
|
## Writing Tests
|
555
555
|
|
556
|
-
Rules should have corresponding specs that contain sample Workflows that exercise all the different ways to trigger their expressions. See [specs](./specs/rules/) for more info.
|
556
|
+
Rules should have corresponding specs that contain sample Workflows that exercise all the different ways to trigger their expressions. See [specs](./specs/rules/) for more info.
|
557
557
|
|
558
|
+
## Contributing
|
559
|
+
|
560
|
+
Check [CONTRIBUTING.md](CONTRIBUTING.md)
|
@@ -12,7 +12,6 @@ module Claws
|
|
12
12
|
$step.meta.action != null &&
|
13
13
|
(
|
14
14
|
$step.meta.action.version == null ||
|
15
|
-
contains(["main", "master"], $step.meta.action.version) ||
|
16
15
|
!($step.meta.action.version =~ "^[a-fA-F0-9]{40}$")
|
17
16
|
) &&
|
18
17
|
!contains($data.trusted_authors, $step.meta.action.author) &&
|
@@ -21,8 +20,7 @@ module Claws
|
|
21
20
|
|
22
21
|
def data
|
23
22
|
{
|
24
|
-
"trusted_authors": configuration.fetch("trusted_authors", [])
|
25
|
-
"loose": configuration.fetch("loose_validation", false)
|
23
|
+
"trusted_authors": configuration.fetch("trusted_authors", [])
|
26
24
|
}
|
27
25
|
end
|
28
26
|
end
|
data/lib/claws/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: claws-scan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Omar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equation
|
@@ -74,30 +74,17 @@ executables:
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
+
- ".policy.yml"
|
77
78
|
- ".rspec"
|
78
79
|
- ".rubocop.yml"
|
79
80
|
- ".ruby-version"
|
81
|
+
- CONTRIBUTING.md
|
80
82
|
- Gemfile
|
81
83
|
- Gemfile.lock
|
82
84
|
- README.md
|
83
85
|
- Rakefile
|
84
86
|
- bin/analyze
|
85
87
|
- config.yml
|
86
|
-
- corpus/automerge_via_action.yml
|
87
|
-
- corpus/automerge_via_cli.yml
|
88
|
-
- corpus/build-docker-image-run-drc-for-cell-gds-using-magic.yml
|
89
|
-
- corpus/cmd.yml
|
90
|
-
- corpus/container.yml
|
91
|
-
- corpus/container_docker.yml
|
92
|
-
- corpus/dispatch_command_injection.yml
|
93
|
-
- corpus/inherit_secrets.yml
|
94
|
-
- corpus/nameless.yml
|
95
|
-
- corpus/permissions.yml
|
96
|
-
- corpus/ruby.yml
|
97
|
-
- corpus/shellcheck.yml
|
98
|
-
- corpus/unsafe_checkout_code_execution.yml
|
99
|
-
- corpus/unsafe_checkout_token_leak.yml
|
100
|
-
- corpus/unscoped_secrets.yml
|
101
88
|
- github_action.yml
|
102
89
|
- lib/claws.rb
|
103
90
|
- lib/claws/application.rb
|
@@ -144,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
131
|
- !ruby/object:Gem::Version
|
145
132
|
version: '0'
|
146
133
|
requirements: []
|
147
|
-
rubygems_version: 3.4.
|
134
|
+
rubygems_version: 3.4.20
|
148
135
|
signing_key:
|
149
136
|
specification_version: 4
|
150
137
|
summary: Analyzes your Github Actions
|
@@ -1,28 +0,0 @@
|
|
1
|
-
name: Automerge via Github Action
|
2
|
-
|
3
|
-
on:
|
4
|
-
pull_request:
|
5
|
-
types:
|
6
|
-
- labeled
|
7
|
-
- unlabeled
|
8
|
-
- synchronize
|
9
|
-
- opened
|
10
|
-
- edited
|
11
|
-
- ready_for_review
|
12
|
-
- reopened
|
13
|
-
- unlocked
|
14
|
-
pull_request_review:
|
15
|
-
types:
|
16
|
-
- submitted
|
17
|
-
check_suite:
|
18
|
-
types:
|
19
|
-
- completed
|
20
|
-
status: {}
|
21
|
-
|
22
|
-
jobs:
|
23
|
-
automerge:
|
24
|
-
runs-on: ubuntu-latest
|
25
|
-
steps:
|
26
|
-
- id: automerge
|
27
|
-
name: automerge
|
28
|
-
uses: "pascalgn/automerge-action@v0.15.5"
|
@@ -1,14 +0,0 @@
|
|
1
|
-
name: Automerge Non-code Changes
|
2
|
-
on:
|
3
|
-
push:
|
4
|
-
paths: ['**.txt']
|
5
|
-
|
6
|
-
permissions:
|
7
|
-
contents: read
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
merge:
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
steps:
|
13
|
-
- name: Merge pull request
|
14
|
-
run: gh pr merge ${{ steps.create_pull_request.outputs.pull-request-number }} --squash --auto --delete-branch
|
@@ -1,170 +0,0 @@
|
|
1
|
-
# Copyright 2021 SkyWater PDK Authors
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
#
|
15
|
-
# SPDX-License-Identifier: Apache 2.0
|
16
|
-
|
17
|
-
name: Build Docker Image for Run DRC for cell GDS (using Magic) Action
|
18
|
-
|
19
|
-
on:
|
20
|
-
workflow_dispatch:
|
21
|
-
push:
|
22
|
-
pull_request_target:
|
23
|
-
|
24
|
-
|
25
|
-
permissions:
|
26
|
-
contents: read
|
27
|
-
|
28
|
-
|
29
|
-
jobs:
|
30
|
-
|
31
|
-
# FIXME: Remove once GitHub Container Registry is working.
|
32
|
-
# docker.pkg.github.com doesn't support buildx built packages, use
|
33
|
-
# docker/build-push-action instead.
|
34
|
-
build-github-package:
|
35
|
-
name: "Building Docker GitHub Package."
|
36
|
-
|
37
|
-
runs-on: ubuntu-latest
|
38
|
-
|
39
|
-
permissions:
|
40
|
-
packages: write # ${{ github.event_name == "push" || github.event_name == "workflow_dispatch" }}
|
41
|
-
|
42
|
-
steps:
|
43
|
-
- name: Checkout code
|
44
|
-
uses: actions/checkout@v2
|
45
|
-
with:
|
46
|
-
# Always clone the full depth so git-describe works.
|
47
|
-
fetch-depth: 0
|
48
|
-
submodules: true
|
49
|
-
|
50
|
-
- name: Set Action Name
|
51
|
-
run: echo "ACTION_NAME=run-drc-for-cell-gds-using-magic" >> $GITHUB_ENV
|
52
|
-
|
53
|
-
- name: Build container image
|
54
|
-
uses: docker/build-push-action@v1
|
55
|
-
with:
|
56
|
-
registry: docker.pkg.github.com
|
57
|
-
username: ${{ github.repository_owner }}
|
58
|
-
password: ${{ github.token }}
|
59
|
-
repository: ${{ github.repository }}/${{ env.ACTION_NAME }}
|
60
|
-
path: ${{ env.ACTION_NAME }}
|
61
|
-
tag_with_ref: true
|
62
|
-
tag_with_sha: true
|
63
|
-
add_git_labels: true
|
64
|
-
push: ${{ startsWith(github.ref, 'refs/heads/') }}
|
65
|
-
|
66
|
-
|
67
|
-
build-docker-image:
|
68
|
-
name: "Building image."
|
69
|
-
|
70
|
-
runs-on: ubuntu-latest
|
71
|
-
|
72
|
-
# Run a local registry
|
73
|
-
services:
|
74
|
-
registry:
|
75
|
-
image: registry:2
|
76
|
-
ports:
|
77
|
-
- 5000:5000
|
78
|
-
|
79
|
-
steps:
|
80
|
-
|
81
|
-
- name: Dump context
|
82
|
-
uses: crazy-max/ghaction-dump-context@v1
|
83
|
-
|
84
|
-
- name: Checkout code
|
85
|
-
uses: actions/checkout@v2
|
86
|
-
with:
|
87
|
-
# Always clone the full depth so git-describe works.
|
88
|
-
fetch-depth: 0
|
89
|
-
submodules: true
|
90
|
-
|
91
|
-
- name: Set Action Name
|
92
|
-
run: echo "ACTION_NAME=run-drc-for-cell-gds-using-magic" >> $GITHUB_ENV
|
93
|
-
|
94
|
-
- name: Detect Push To Config
|
95
|
-
id: push_to
|
96
|
-
shell: python
|
97
|
-
env:
|
98
|
-
HAS_GCR_JSON_KEY: ${{ !!(secrets.GCR_JSON_KEY) }}
|
99
|
-
run: |
|
100
|
-
import os
|
101
|
-
gh_event = os.environ['GITHUB_EVENT_NAME']
|
102
|
-
|
103
|
-
i = []
|
104
|
-
print("Adding local service.")
|
105
|
-
i.append("localhost:5000/${{ env.ACTION_NAME }}")
|
106
|
-
|
107
|
-
if "${{ env.HAS_GCR_JSON_KEY }}":
|
108
|
-
print("Adding Google Container Repository (gcr.io)")
|
109
|
-
i.append("gcr.io/skywater-pdk/actions/${{ env.ACTION_NAME }}")
|
110
|
-
|
111
|
-
#print("Adding GitHub Container Repository (ghcr.io)")
|
112
|
-
#i.append("ghcr.io/${{ github.repository }}/${{ env.ACTION_NAME }}")
|
113
|
-
|
114
|
-
l = ",".join(i)
|
115
|
-
print("Final locations:", repr(l))
|
116
|
-
print("::set-output name=images::{}".format(l))
|
117
|
-
|
118
|
-
- name: Docker meta
|
119
|
-
id: docker_meta
|
120
|
-
uses: docker/metadata-action@v3
|
121
|
-
with:
|
122
|
-
images: ${{ steps.push_to.outputs.images }}
|
123
|
-
tags: |
|
124
|
-
type=ref,event=tag
|
125
|
-
type=ref,event=pr
|
126
|
-
type=ref,event=branch
|
127
|
-
type=sha
|
128
|
-
type=sha,format=long
|
129
|
-
|
130
|
-
- name: Set up QEMU
|
131
|
-
uses: docker/setup-qemu-action@v1
|
132
|
-
|
133
|
-
- name: Set up Docker Buildx
|
134
|
-
uses: docker/setup-buildx-action@v1
|
135
|
-
with:
|
136
|
-
driver-opts: network=host
|
137
|
-
|
138
|
-
- name: Login to Google Container Registry
|
139
|
-
if: ${{ contains(steps.push_to.outputs.images, 'gcr.io') }}
|
140
|
-
uses: docker/login-action@v1
|
141
|
-
with:
|
142
|
-
registry: gcr.io
|
143
|
-
username: _json_key
|
144
|
-
password: ${{ secrets.GCR_JSON_KEY }}
|
145
|
-
|
146
|
-
- name: Login to GitHub Container Registry
|
147
|
-
if: ${{ contains(steps.push_to.outputs.images, 'ghcr.io') }}
|
148
|
-
uses: docker/login-action@v1
|
149
|
-
with:
|
150
|
-
username: ${{ github.repository_owner }}
|
151
|
-
password: ${{ github.token }}
|
152
|
-
registry: ghcr.io
|
153
|
-
|
154
|
-
- name: Build and push
|
155
|
-
uses: docker/build-push-action@v2
|
156
|
-
id: docker_build
|
157
|
-
with:
|
158
|
-
context: ${{ env.ACTION_NAME }}
|
159
|
-
file: ${{ env.ACTION_NAME }}/Dockerfile
|
160
|
-
push: true
|
161
|
-
tags: |
|
162
|
-
${{ steps.docker_meta.outputs.tags }}
|
163
|
-
localhost:5000/${{ env.ACTION_NAME }}:latest
|
164
|
-
labels: ${{ steps.docker_meta.outputs.labels }}
|
165
|
-
|
166
|
-
- name: Inspect
|
167
|
-
run: docker buildx imagetools inspect localhost:5000/${{ env.ACTION_NAME }}:latest
|
168
|
-
|
169
|
-
- name: Image digest
|
170
|
-
run: echo ${{ steps.docker_build.outputs.digest }}
|
data/corpus/cmd.yml
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# INSECURE
|
2
|
-
|
3
|
-
on: issue_comment
|
4
|
-
name: IssueOps - Demo
|
5
|
-
jobs:
|
6
|
-
act-on-issue:
|
7
|
-
runs-on: ubuntu-latest
|
8
|
-
steps:
|
9
|
-
- name: Checkout
|
10
|
-
uses: actions/checkout@v1
|
11
|
-
- name: Reset demo if a demo or reset issue was opened
|
12
|
-
run: ./scripts/reset-demo.sh "${{ github.event.issue.body }}" "${{ github.event.issue.number }}"
|
13
|
-
env:
|
14
|
-
GITHUB_COM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/corpus/container.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
name: CI
|
2
|
-
on:
|
3
|
-
push:
|
4
|
-
branches: [ main ]
|
5
|
-
jobs:
|
6
|
-
container-test-job:
|
7
|
-
runs-on: ubuntu-latest
|
8
|
-
container:
|
9
|
-
image: node:14.16
|
10
|
-
env:
|
11
|
-
NODE_ENV: development
|
12
|
-
ports:
|
13
|
-
- 80
|
14
|
-
volumes:
|
15
|
-
- my_docker_volume:/volume_mount
|
16
|
-
options: --cpus 1
|
17
|
-
steps:
|
18
|
-
- name: Check for dockerenv file
|
19
|
-
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
|
data/corpus/container_docker.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
name: Dispatch Me
|
2
|
-
on:
|
3
|
-
workflow_dispatch:
|
4
|
-
inputs:
|
5
|
-
name:
|
6
|
-
description: 'Who I should say hello to'
|
7
|
-
required: true
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
greet:
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
steps:
|
13
|
-
- name: Checkout
|
14
|
-
uses: actions/checkout@v1
|
15
|
-
- name: Reset demo if a demo or reset issue was opened
|
16
|
-
run: ./scripts/greet.sh "${{ github.event.inputs.name }}"
|
17
|
-
|
data/corpus/inherit_secrets.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
on: [workflow_call]
|
2
|
-
name: yea
|
3
|
-
jobs:
|
4
|
-
rake:
|
5
|
-
runs-on: ubuntu-latest
|
6
|
-
secrets: inherit
|
7
|
-
steps:
|
8
|
-
- name: Checkout
|
9
|
-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
|
10
|
-
with:
|
11
|
-
ref: ${{ github.event.pull_request.head.sha }}
|
12
|
-
# ignore: CommandInjection
|
13
|
-
- name: test
|
14
|
-
run: /bin/ls ${{ github.event.test }}
|
15
|
-
- name: Build
|
16
|
-
run: rake
|
17
|
-
env:
|
18
|
-
GITHUB_TOKEN: ${{ github.token }}
|
19
|
-
YOINK: ${{ secrets.FLAG }}
|
20
|
-
|
data/corpus/nameless.yml
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
on: [push, pull_request, pull_request_target]
|
2
|
-
jobs:
|
3
|
-
test:
|
4
|
-
runs-on: ubuntu-latest
|
5
|
-
steps:
|
6
|
-
- uses: actions/checkout@v3
|
7
|
-
- uses: ruby/setup-ruby@v1
|
8
|
-
with:
|
9
|
-
ruby-version: '3.0' # Not needed with a .ruby-version file
|
10
|
-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
11
|
-
- run: bundle exec rake
|
data/corpus/permissions.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
name: Deploy
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- main
|
7
|
-
|
8
|
-
permissions:
|
9
|
-
packages: write
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
build:
|
13
|
-
runs-on: ubuntu-latest
|
14
|
-
permissions:
|
15
|
-
packages: write
|
16
|
-
steps:
|
17
|
-
- uses: action/checkout@v3
|
18
|
-
- name: push
|
19
|
-
run: rake release
|
data/corpus/ruby.yml
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
name: My workflow
|
2
|
-
on: [push, pull_request, pull_request_target]
|
3
|
-
jobs:
|
4
|
-
test:
|
5
|
-
runs-on: ubuntu-latest
|
6
|
-
steps:
|
7
|
-
- uses: actions/checkout@v3
|
8
|
-
- uses: ruby/setup-ruby@v1
|
9
|
-
with:
|
10
|
-
ruby-version: '3.0' # Not needed with a .ruby-version file
|
11
|
-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
12
|
-
- run: bundle exec rake
|
data/corpus/shellcheck.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
name: Unsafe Checkout that Leads to RCE
|
2
|
-
|
3
|
-
on: [pull_request_target]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
name: Build
|
8
|
-
runs-on: ubuntu-latest
|
9
|
-
steps:
|
10
|
-
# check out the attacker controlled branch with their code
|
11
|
-
- uses: actions/checkout@v2
|
12
|
-
with:
|
13
|
-
ref: ${{ github.event.pull_request.head.sha }}
|
14
|
-
|
15
|
-
# set up the environment and run specs
|
16
|
-
# because Rakefile comes from the attacker's branch
|
17
|
-
# we end up executing their code, even though they don't
|
18
|
-
# control the command here
|
19
|
-
- run: |
|
20
|
-
rake setup
|
21
|
-
rake spec
|
@@ -1,33 +0,0 @@
|
|
1
|
-
name: Unsafe Checkout that can Leak Tokens
|
2
|
-
|
3
|
-
on: pull_request_target
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
release:
|
7
|
-
runs-on: ubuntu-latest
|
8
|
-
steps:
|
9
|
-
# check out the attacker controlled branch
|
10
|
-
- name: Checkout (depth 0)
|
11
|
-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
|
12
|
-
with:
|
13
|
-
ref: ${{ github.event.pull_request.head.sha }}
|
14
|
-
|
15
|
-
# grab the version number from the VERSION file
|
16
|
-
# however... because we're getting the contents of the file
|
17
|
-
# from the attacker's branch, and because git allows symlinks
|
18
|
-
# the attacker can symlink VERSION to any other file on the system
|
19
|
-
# to leak its contents.
|
20
|
-
- name: Get PR Version
|
21
|
-
id: version_number
|
22
|
-
run: echo "::set-output name=version::$(cat VERSION)"
|
23
|
-
|
24
|
-
# Dump the version number into a Github comment for everyone to see
|
25
|
-
- name: Comment the new version
|
26
|
-
uses: peter-evans/create-or-update-comment@v2
|
27
|
-
with:
|
28
|
-
issue-number: ${{ github.event.pull_request.number }}
|
29
|
-
comment-author: 'github-actions[bot]'
|
30
|
-
body: |
|
31
|
-
Version was updated to
|
32
|
-
```${{ steps.version_number.outputs.version }}```
|
33
|
-
bye now...
|
data/corpus/unscoped_secrets.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
on: [pull_request]
|
2
|
-
name: yea
|
3
|
-
jobs:
|
4
|
-
rake:
|
5
|
-
runs-on: ubuntu-latest
|
6
|
-
steps:
|
7
|
-
- name: Checkout
|
8
|
-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
|
9
|
-
with:
|
10
|
-
ref: ${{ github.event.pull_request.head.sha }}
|
11
|
-
- name: Build
|
12
|
-
run: rake
|
13
|
-
env:
|
14
|
-
GITHUB_TOKEN: ${{ github.token }}
|
15
|
-
YOINK: ${{ secrets.API_KEY }}
|
16
|
-
|