bitwarden_workflow_linter 0.3.0__py3-none-any.whl → 0.4.0__py3-none-any.whl
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.
- bitwarden_workflow_linter/__about__.py +1 -1
- bitwarden_workflow_linter/actions.py +44 -20
- bitwarden_workflow_linter/default_actions.json +179 -74
- bitwarden_workflow_linter/rules/job_environment_prefix.py +8 -2
- bitwarden_workflow_linter/rules/name_capitalized.py +2 -1
- bitwarden_workflow_linter/rules/step_approved.py +8 -11
- bitwarden_workflow_linter/rules/step_pinned.py +1 -1
- bitwarden_workflow_linter/rules/underscore_outputs.py +1 -9
- {bitwarden_workflow_linter-0.3.0.dist-info → bitwarden_workflow_linter-0.4.0.dist-info}/METADATA +3 -2
- {bitwarden_workflow_linter-0.3.0.dist-info → bitwarden_workflow_linter-0.4.0.dist-info}/RECORD +13 -13
- {bitwarden_workflow_linter-0.3.0.dist-info → bitwarden_workflow_linter-0.4.0.dist-info}/WHEEL +1 -1
- {bitwarden_workflow_linter-0.3.0.dist-info → bitwarden_workflow_linter-0.4.0.dist-info}/entry_points.txt +0 -0
- {bitwarden_workflow_linter-0.3.0.dist-info → bitwarden_workflow_linter-0.4.0.dist-info}/licenses/LICENSE.txt +0 -0
@@ -57,17 +57,22 @@ class ActionsCmd:
|
|
57
57
|
parser_actions = subparsers.add_parser(
|
58
58
|
"actions", help="!!BETA!!\nAdd or Update Actions in the pre-approved list."
|
59
59
|
)
|
60
|
-
parser_actions.add_argument(
|
61
|
-
"-o", "--output", action="store", default="actions.json"
|
62
|
-
)
|
63
60
|
subparsers_actions = parser_actions.add_subparsers(
|
64
61
|
required=True, dest="actions_command"
|
65
62
|
)
|
66
|
-
subparsers_actions.add_parser(
|
63
|
+
parser_actions_update = subparsers_actions.add_parser(
|
64
|
+
"update", help="update action versions"
|
65
|
+
)
|
66
|
+
parser_actions_update.add_argument(
|
67
|
+
"-o", "--output", action="store", default="actions.json", help="output file"
|
68
|
+
)
|
67
69
|
parser_actions_add = subparsers_actions.add_parser(
|
68
70
|
"add", help="add action to approved list"
|
69
71
|
)
|
70
72
|
parser_actions_add.add_argument("name", help="action name [git owner/repo]")
|
73
|
+
parser_actions_add.add_argument(
|
74
|
+
"-o", "--output", action="store", default="actions.json", help="output file"
|
75
|
+
)
|
71
76
|
|
72
77
|
return subparsers
|
73
78
|
|
@@ -127,29 +132,38 @@ class ActionsCmd:
|
|
127
132
|
f"https://api.github.com/repos/{action.name}/releases/latest",
|
128
133
|
action.name,
|
129
134
|
)
|
130
|
-
if not response:
|
131
|
-
|
135
|
+
if response is not None and response.status != 404:
|
136
|
+
tag_name = json.loads(response.data)["tag_name"]
|
132
137
|
|
133
|
-
|
138
|
+
# Get the URL to the commit for the tag
|
139
|
+
response = self.get_github_api_response(
|
140
|
+
f"https://api.github.com/repos/{action.name}/git/ref/tags/{tag_name}",
|
141
|
+
action.name,
|
142
|
+
)
|
134
143
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
144
|
+
if response is None or response.status != 200:
|
145
|
+
return None
|
146
|
+
|
147
|
+
if json.loads(response.data)["object"]["type"] != "commit":
|
148
|
+
url = json.loads(response.data)["object"]["url"]
|
149
|
+
# Follow the URL and get the commit sha for tags
|
150
|
+
response = self.get_github_api_response(url, action.name)
|
151
|
+
if not response:
|
152
|
+
return None
|
142
153
|
|
143
|
-
if json.loads(response.data)["object"]["type"] == "commit":
|
144
154
|
sha = json.loads(response.data)["object"]["sha"]
|
145
155
|
else:
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
156
|
+
# Get tag from latest tag
|
157
|
+
response = self.get_github_api_response(
|
158
|
+
f"https://api.github.com/repos/{action.name}/tags",
|
159
|
+
action.name,
|
160
|
+
)
|
161
|
+
|
162
|
+
if response is None or response.status != 200:
|
150
163
|
return None
|
151
164
|
|
152
|
-
sha = json.loads(response.data)["
|
165
|
+
sha = json.loads(response.data)[0]["commit"]["sha"]
|
166
|
+
tag_name = json.loads(response.data)[0]["name"]
|
153
167
|
except KeyError as err:
|
154
168
|
raise GitHubApiSchemaError(
|
155
169
|
f"Error with the GitHub API Response Schema for either /releases or"
|
@@ -182,10 +196,20 @@ class ActionsCmd:
|
|
182
196
|
updated_actions = self.settings.approved_actions
|
183
197
|
proposed_action = Action(name=new_action_name)
|
184
198
|
|
199
|
+
# Remove the action directory if the action is in a multi-actions repo
|
200
|
+
if len(new_action_name.split("/")) > 2:
|
201
|
+
modified_action = "/".join(new_action_name.split("/")[:-1])
|
202
|
+
print(
|
203
|
+
f" - {new_action_name} \033[{Colors.yellow}modified\033[0m to {modified_action}"
|
204
|
+
)
|
205
|
+
proposed_action = Action(name=modified_action)
|
206
|
+
|
185
207
|
if self.exists(proposed_action):
|
186
208
|
latest = self.get_latest_version(proposed_action)
|
187
209
|
if latest:
|
188
210
|
updated_actions[latest.name] = latest
|
211
|
+
else:
|
212
|
+
print(f" - {new_action_name} \033[{Colors.red}not found\033[0m")
|
189
213
|
|
190
214
|
self.save_actions(updated_actions, filename)
|
191
215
|
return 0
|
@@ -6,8 +6,8 @@
|
|
6
6
|
},
|
7
7
|
"Azure/functions-action": {
|
8
8
|
"name": "Azure/functions-action",
|
9
|
-
"sha": "
|
10
|
-
"version": "v1.5.
|
9
|
+
"sha": "fd80521afbba9a2a76a99ba1acc07aff8d733d11",
|
10
|
+
"version": "v1.5.2"
|
11
11
|
},
|
12
12
|
"Azure/get-keyvault-secrets": {
|
13
13
|
"name": "Azure/get-keyvault-secrets",
|
@@ -16,13 +16,18 @@
|
|
16
16
|
},
|
17
17
|
"Azure/login": {
|
18
18
|
"name": "Azure/login",
|
19
|
-
"sha": "
|
20
|
-
"version": "
|
19
|
+
"sha": "a65d910e8af852a8061c627c456678983e180302",
|
20
|
+
"version": "v2.2.0"
|
21
|
+
},
|
22
|
+
"Azure/setup-helm": {
|
23
|
+
"name": "Azure/setup-helm",
|
24
|
+
"sha": "fe7b79cd5ee1e45176fcad797de68ecaf3ca4814",
|
25
|
+
"version": "v4.2.0"
|
21
26
|
},
|
22
27
|
"Swatinem/rust-cache": {
|
23
28
|
"name": "Swatinem/rust-cache",
|
24
|
-
"sha": "
|
25
|
-
"version": "v2.7.
|
29
|
+
"sha": "82a92a6e8fbeee089604da2575dc567ae9ddeaab",
|
30
|
+
"version": "v2.7.5"
|
26
31
|
},
|
27
32
|
"SwiftDocOrg/github-wiki-publish-action": {
|
28
33
|
"name": "SwiftDocOrg/github-wiki-publish-action",
|
@@ -36,28 +41,43 @@
|
|
36
41
|
},
|
37
42
|
"act10ns/slack": {
|
38
43
|
"name": "act10ns/slack",
|
39
|
-
"sha": "
|
40
|
-
"version": "v2.
|
44
|
+
"sha": "44541246747a30eb3102d87f7a4cc5471b0ffb7d",
|
45
|
+
"version": "v2.1.0"
|
46
|
+
},
|
47
|
+
"actions-cool/check-user-permission": {
|
48
|
+
"name": "actions-cool/check-user-permission",
|
49
|
+
"sha": "956b2e73cdfe3bcb819bb7225e490cb3b18fd76e",
|
50
|
+
"version": "v2.2.1"
|
41
51
|
},
|
42
52
|
"actions/cache": {
|
43
53
|
"name": "actions/cache",
|
44
|
-
"sha": "
|
45
|
-
"version": "
|
54
|
+
"sha": "1bd1e32a3bdc45362d1e726936510720a7c30a57",
|
55
|
+
"version": "v4.2.0"
|
46
56
|
},
|
47
57
|
"actions/checkout": {
|
48
58
|
"name": "actions/checkout",
|
49
|
-
"sha": "
|
50
|
-
"version": "v4.
|
59
|
+
"sha": "11bd71901bbe5b1630ceea73d27597364c9af683",
|
60
|
+
"version": "v4.2.2"
|
61
|
+
},
|
62
|
+
"actions/create-github-app-token": {
|
63
|
+
"name": "actions/create-github-app-token",
|
64
|
+
"sha": "5d869da34e18e7287c1daad50e0b8ea0f506ce69",
|
65
|
+
"version": "v1.11.0"
|
51
66
|
},
|
52
67
|
"actions/delete-package-versions": {
|
53
68
|
"name": "actions/delete-package-versions",
|
54
|
-
"sha": "
|
55
|
-
"version": "
|
69
|
+
"sha": "e5bc658cc4c965c472efe991f8beea3981499c55",
|
70
|
+
"version": "v5.0.0"
|
71
|
+
},
|
72
|
+
"actions/deploy-pages": {
|
73
|
+
"name": "actions/deploy-pages",
|
74
|
+
"sha": "d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e",
|
75
|
+
"version": "v4.0.5"
|
56
76
|
},
|
57
77
|
"actions/download-artifact": {
|
58
78
|
"name": "actions/download-artifact",
|
59
|
-
"sha": "
|
60
|
-
"version": "v4.1.
|
79
|
+
"sha": "fa0a91b85d4f404e444e00e005971372dc801d16",
|
80
|
+
"version": "v4.1.8"
|
61
81
|
},
|
62
82
|
"actions/github-script": {
|
63
83
|
"name": "actions/github-script",
|
@@ -71,23 +91,23 @@
|
|
71
91
|
},
|
72
92
|
"actions/setup-dotnet": {
|
73
93
|
"name": "actions/setup-dotnet",
|
74
|
-
"sha": "
|
75
|
-
"version": "v4.
|
94
|
+
"sha": "3e891b0cb619bf60e2c25674b222b8940e2c1c25",
|
95
|
+
"version": "v4.1.0"
|
76
96
|
},
|
77
97
|
"actions/setup-java": {
|
78
98
|
"name": "actions/setup-java",
|
79
|
-
"sha": "
|
80
|
-
"version": "v4.
|
99
|
+
"sha": "8df1039502a15bceb9433410b1a100fbe190c53b",
|
100
|
+
"version": "v4.5.0"
|
81
101
|
},
|
82
102
|
"actions/setup-node": {
|
83
103
|
"name": "actions/setup-node",
|
84
|
-
"sha": "
|
85
|
-
"version": "v4.0
|
104
|
+
"sha": "39370e3970a6d050c480ffad4ff0ed4d3fdee5af",
|
105
|
+
"version": "v4.1.0"
|
86
106
|
},
|
87
107
|
"actions/setup-python": {
|
88
108
|
"name": "actions/setup-python",
|
89
|
-
"sha": "
|
90
|
-
"version": "v5.
|
109
|
+
"sha": "0b93645e9fea7318ecaed2b359559ac225c90a2b",
|
110
|
+
"version": "v5.3.0"
|
91
111
|
},
|
92
112
|
"actions/stale": {
|
93
113
|
"name": "actions/stale",
|
@@ -96,18 +116,33 @@
|
|
96
116
|
},
|
97
117
|
"actions/upload-artifact": {
|
98
118
|
"name": "actions/upload-artifact",
|
99
|
-
"sha": "
|
100
|
-
"version": "v4.
|
119
|
+
"sha": "b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882",
|
120
|
+
"version": "v4.4.3"
|
121
|
+
},
|
122
|
+
"actions/upload-pages-artifact": {
|
123
|
+
"name": "actions/upload-pages-artifact",
|
124
|
+
"sha": "56afc609e74202658d3ffba0e8f6dda462b719fa",
|
125
|
+
"version": "v3.0.1"
|
126
|
+
},
|
127
|
+
"anchore/scan-action": {
|
128
|
+
"name": "anchore/scan-action",
|
129
|
+
"sha": "869c549e657a088dc0441b08ce4fc0ecdac2bb65",
|
130
|
+
"version": "v5.3.0"
|
101
131
|
},
|
102
132
|
"android-actions/setup-android": {
|
103
133
|
"name": "android-actions/setup-android",
|
104
|
-
"sha": "
|
105
|
-
"version": "v3.2.
|
134
|
+
"sha": "9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407",
|
135
|
+
"version": "v3.2.2"
|
136
|
+
},
|
137
|
+
"andymckay/labeler": {
|
138
|
+
"name": "andymckay/labeler",
|
139
|
+
"sha": "e6c4322d0397f3240f0e7e30a33b5c5df2d39e90",
|
140
|
+
"version": "1.0.4"
|
106
141
|
},
|
107
142
|
"azure/webapps-deploy": {
|
108
143
|
"name": "azure/webapps-deploy",
|
109
|
-
"sha": "
|
110
|
-
"version": "v3.0.
|
144
|
+
"sha": "de617f46172a906d0617bb0e50d81e9e3aec24c8",
|
145
|
+
"version": "v3.0.1"
|
111
146
|
},
|
112
147
|
"bitwarden/sm-action": {
|
113
148
|
"name": "bitwarden/sm-action",
|
@@ -116,22 +151,22 @@
|
|
116
151
|
},
|
117
152
|
"checkmarx/ast-github-action": {
|
118
153
|
"name": "checkmarx/ast-github-action",
|
119
|
-
"sha": "
|
120
|
-
"version": "2.0.
|
154
|
+
"sha": "b74e8d514feae4ad5ad2b43e72590935bd2daf5f",
|
155
|
+
"version": "2.0.39"
|
121
156
|
},
|
122
157
|
"chrnorm/deployment-action": {
|
123
158
|
"name": "chrnorm/deployment-action",
|
124
|
-
"sha": "
|
125
|
-
"version": "v2.0.
|
159
|
+
"sha": "55729fcebec3d284f60f5bcabbd8376437d696b1",
|
160
|
+
"version": "v2.0.7"
|
126
161
|
},
|
127
162
|
"chrnorm/deployment-status": {
|
128
163
|
"name": "chrnorm/deployment-status",
|
129
|
-
"sha": "
|
130
|
-
"version": "v2.0.
|
164
|
+
"sha": "9a72af4586197112e0491ea843682b5dc280d806",
|
165
|
+
"version": "v2.0.3"
|
131
166
|
},
|
132
167
|
"chromaui/action": {
|
133
168
|
"name": "chromaui/action",
|
134
|
-
"sha": "
|
169
|
+
"sha": "e90c5a5e3bc2eb3b8e110d606f56a0f44fa47700",
|
135
170
|
"version": "v1"
|
136
171
|
},
|
137
172
|
"cloudflare/pages-action": {
|
@@ -139,6 +174,16 @@
|
|
139
174
|
"sha": "f0a1cd58cd66095dee69bfa18fa5efd1dde93bca",
|
140
175
|
"version": "v1.5.0"
|
141
176
|
},
|
177
|
+
"codecov/codecov-action": {
|
178
|
+
"name": "codecov/codecov-action",
|
179
|
+
"sha": "7f8b4b4bde536c465e797be725718b88c5d95e0e",
|
180
|
+
"version": "v5.1.1"
|
181
|
+
},
|
182
|
+
"codecov/test-results-action": {
|
183
|
+
"name": "codecov/test-results-action",
|
184
|
+
"sha": "9739113ad922ea0a9abb4b2c0f8bf6a4aa8ef820",
|
185
|
+
"version": "v1.0.1"
|
186
|
+
},
|
142
187
|
"convictional/trigger-workflow-and-wait": {
|
143
188
|
"name": "convictional/trigger-workflow-and-wait",
|
144
189
|
"sha": "f69fa9eedd3c62a599220f4d5745230e237904be",
|
@@ -146,48 +191,48 @@
|
|
146
191
|
},
|
147
192
|
"crazy-max/ghaction-import-gpg": {
|
148
193
|
"name": "crazy-max/ghaction-import-gpg",
|
149
|
-
"sha": "
|
150
|
-
"version": "v6.
|
194
|
+
"sha": "cb9bde2e2525e640591a934b1fd28eef1dcaf5e5",
|
195
|
+
"version": "v6.2.0"
|
151
196
|
},
|
152
197
|
"crowdin/github-action": {
|
153
198
|
"name": "crowdin/github-action",
|
154
|
-
"sha": "
|
155
|
-
"version": "
|
199
|
+
"sha": "a9ffb7d5ac46eca1bb1f06656bf888b39462f161",
|
200
|
+
"version": "v2.4.0"
|
156
201
|
},
|
157
202
|
"dawidd6/action-download-artifact": {
|
158
203
|
"name": "dawidd6/action-download-artifact",
|
159
|
-
"sha": "
|
160
|
-
"version": "
|
204
|
+
"sha": "80620a5d27ce0ae443b965134db88467fc607b43",
|
205
|
+
"version": "v7"
|
161
206
|
},
|
162
207
|
"dawidd6/action-homebrew-bump-formula": {
|
163
208
|
"name": "dawidd6/action-homebrew-bump-formula",
|
164
|
-
"sha": "
|
165
|
-
"version": "
|
209
|
+
"sha": "8d494330bce4434918392df134ad3db1167904db",
|
210
|
+
"version": "v4"
|
166
211
|
},
|
167
212
|
"digitalocean/action-doctl": {
|
168
213
|
"name": "digitalocean/action-doctl",
|
169
|
-
"sha": "
|
170
|
-
"version": "v2.5.
|
214
|
+
"sha": "135ac0aa0eed4437d547c6f12c364d3006b42824",
|
215
|
+
"version": "v2.5.1"
|
171
216
|
},
|
172
217
|
"docker/build-push-action": {
|
173
218
|
"name": "docker/build-push-action",
|
174
|
-
"sha": "
|
175
|
-
"version": "
|
219
|
+
"sha": "48aba3b46d1b1fec4febb7c5d0c644b249a11355",
|
220
|
+
"version": "v6.10.0"
|
176
221
|
},
|
177
222
|
"docker/setup-buildx-action": {
|
178
223
|
"name": "docker/setup-buildx-action",
|
179
|
-
"sha": "
|
180
|
-
"version": "v3.
|
224
|
+
"sha": "c47758b77c9736f4b2ef4073d4d51994fabfe349",
|
225
|
+
"version": "v3.7.1"
|
181
226
|
},
|
182
227
|
"docker/setup-qemu-action": {
|
183
228
|
"name": "docker/setup-qemu-action",
|
184
|
-
"sha": "
|
185
|
-
"version": "v3.
|
229
|
+
"sha": "49b3bc8e6bdd4a60e6116a5414239cba5943d3cf",
|
230
|
+
"version": "v3.2.0"
|
186
231
|
},
|
187
232
|
"dorny/test-reporter": {
|
188
233
|
"name": "dorny/test-reporter",
|
189
|
-
"sha": "
|
190
|
-
"version": "v1.
|
234
|
+
"sha": "31a54ee7ebcacc03a09ea97a7e5465a47b84aea5",
|
235
|
+
"version": "v1.9.1"
|
191
236
|
},
|
192
237
|
"dtolnay/rust-toolchain": {
|
193
238
|
"name": "dtolnay/rust-toolchain",
|
@@ -196,68 +241,128 @@
|
|
196
241
|
},
|
197
242
|
"futureware-tech/simulator-action": {
|
198
243
|
"name": "futureware-tech/simulator-action",
|
199
|
-
"sha": "
|
200
|
-
"version": "
|
244
|
+
"sha": "dab10d813144ef59b48d401cd95da151222ef8cd",
|
245
|
+
"version": "v4"
|
246
|
+
},
|
247
|
+
"github/codeql-action": {
|
248
|
+
"name": "github/codeql-action",
|
249
|
+
"sha": "3096afedf9873361b2b2f65e1445b13272c83eb8",
|
250
|
+
"version": "codeql-bundle-v2.20.0"
|
251
|
+
},
|
252
|
+
"gradle/actions": {
|
253
|
+
"name": "gradle/actions",
|
254
|
+
"sha": "cc4fc85e6b35bafd578d5ffbc76a5518407e1af0",
|
255
|
+
"version": "v4.2.1"
|
201
256
|
},
|
202
257
|
"hashicorp/setup-packer": {
|
203
258
|
"name": "hashicorp/setup-packer",
|
204
|
-
"sha": "
|
205
|
-
"version": "
|
259
|
+
"sha": "1aa358be5cf73883762b302a3a03abd66e75b232",
|
260
|
+
"version": "v3.1.0"
|
261
|
+
},
|
262
|
+
"helm/chart-releaser-action": {
|
263
|
+
"name": "helm/chart-releaser-action",
|
264
|
+
"sha": "a917fd15b20e8b64b94d9158ad54cd6345335584",
|
265
|
+
"version": "v1.6.0"
|
266
|
+
},
|
267
|
+
"helm/chart-testing-action": {
|
268
|
+
"name": "helm/chart-testing-action",
|
269
|
+
"sha": "e6669bcd63d7cb57cb4380c33043eebe5d111992",
|
270
|
+
"version": "v2.6.1"
|
271
|
+
},
|
272
|
+
"helm/kind-action": {
|
273
|
+
"name": "helm/kind-action",
|
274
|
+
"sha": "0025e74a8c7512023d06dc019c617aa3cf561fde",
|
275
|
+
"version": "v1.10.0"
|
276
|
+
},
|
277
|
+
"launchdarkly/find-code-references-in-pull-request": {
|
278
|
+
"name": "launchdarkly/find-code-references-in-pull-request",
|
279
|
+
"sha": "d008aa4f321d8cd35314d9cb095388dcfde84439",
|
280
|
+
"version": "v2.0.0"
|
206
281
|
},
|
207
282
|
"macauley/action-homebrew-bump-cask": {
|
208
283
|
"name": "macauley/action-homebrew-bump-cask",
|
209
284
|
"sha": "445c42390d790569d938f9068d01af39ca030feb",
|
210
285
|
"version": "v1.0.0"
|
211
286
|
},
|
212
|
-
"maxim-lobanov/setup-xcode"
|
287
|
+
"maxim-lobanov/setup-xcode": {
|
213
288
|
"name": "maxim-lobanov/setup-xcode",
|
214
289
|
"sha": "60606e260d2fc5762a71e64e74b2174e8ea3c8bd",
|
215
290
|
"version": "v1.6.0"
|
216
291
|
},
|
217
292
|
"microsoft/setup-msbuild": {
|
218
293
|
"name": "microsoft/setup-msbuild",
|
219
|
-
"sha": "
|
220
|
-
"version": "
|
294
|
+
"sha": "6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce",
|
295
|
+
"version": "v2"
|
221
296
|
},
|
222
297
|
"ncipollo/release-action": {
|
223
298
|
"name": "ncipollo/release-action",
|
224
|
-
"sha": "
|
225
|
-
"version": "v1.
|
299
|
+
"sha": "2c591bcc8ecdcd2db72b97d6147f871fcd833ba5",
|
300
|
+
"version": "v1.14.0"
|
226
301
|
},
|
227
302
|
"peter-evans/close-issue": {
|
228
303
|
"name": "peter-evans/close-issue",
|
229
304
|
"sha": "276d7966e389d888f011539a86c8920025ea0626",
|
230
305
|
"version": "v3.0.1"
|
231
306
|
},
|
307
|
+
"reactivecircus/android-emulator-runner": {
|
308
|
+
"name": "reactivecircus/android-emulator-runner",
|
309
|
+
"sha": "62dbb605bba737720e10b196cb4220d374026a6d",
|
310
|
+
"version": "v2.33.0"
|
311
|
+
},
|
232
312
|
"ruby/setup-ruby": {
|
233
313
|
"name": "ruby/setup-ruby",
|
234
|
-
"sha": "
|
235
|
-
"version": "v1.
|
314
|
+
"sha": "2a18b06812b0e15bb916e1df298d3e740422c47e",
|
315
|
+
"version": "v1.203.0"
|
236
316
|
},
|
237
317
|
"samuelmeuli/action-snapcraft": {
|
238
318
|
"name": "samuelmeuli/action-snapcraft",
|
239
319
|
"sha": "d33c176a9b784876d966f80fb1b461808edc0641",
|
240
320
|
"version": "v2.1.1"
|
241
321
|
},
|
322
|
+
"slackapi/slack-github-action": {
|
323
|
+
"name": "slackapi/slack-github-action",
|
324
|
+
"sha": "485a9d42d3a73031f12ec201c457e2162c45d02d",
|
325
|
+
"version": "v2.0.0"
|
326
|
+
},
|
327
|
+
"sigstore/cosign-installer": {
|
328
|
+
"name": "sigstore/cosign-installer",
|
329
|
+
"sha": "dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da",
|
330
|
+
"version": "v3.7.0"
|
331
|
+
},
|
242
332
|
"snapcore/action-build": {
|
243
333
|
"name": "snapcore/action-build",
|
244
|
-
"sha": "
|
245
|
-
"version": "v1.
|
334
|
+
"sha": "3bdaa03e1ba6bf59a65f84a751d943d549a54e79",
|
335
|
+
"version": "v1.3.0"
|
336
|
+
},
|
337
|
+
"softprops/action-gh-release": {
|
338
|
+
"name": "softprops/action-gh-release",
|
339
|
+
"sha": "7b4da11513bf3f43f9999e90eabced41ab8bb048",
|
340
|
+
"version": "v2.2.0"
|
246
341
|
},
|
247
342
|
"sonarsource/sonarcloud-github-action": {
|
248
343
|
"name": "sonarsource/sonarcloud-github-action",
|
249
|
-
"sha": "
|
250
|
-
"version": "
|
344
|
+
"sha": "02ef91109b2d589e757aefcfb2854c2783fd7b19",
|
345
|
+
"version": "v4.0.0"
|
346
|
+
},
|
347
|
+
"sonarsource/sonarqube-scan-action": {
|
348
|
+
"name": "sonarsource/sonarqube-scan-action",
|
349
|
+
"sha": "bfd4e558cda28cda6b5defafb9232d191be8c203",
|
350
|
+
"version": "v4.2.1"
|
251
351
|
},
|
252
352
|
"stackrox/kube-linter-action": {
|
253
353
|
"name": "stackrox/kube-linter-action",
|
254
|
-
"sha": "
|
255
|
-
"version": "v1.0.
|
354
|
+
"sha": "5792edc6a03735d592b13c08201711327a935735",
|
355
|
+
"version": "v1.0.5"
|
256
356
|
},
|
257
357
|
"tj-actions/changed-files": {
|
258
358
|
"name": "tj-actions/changed-files",
|
259
|
-
"sha": "
|
260
|
-
"version": "
|
359
|
+
"sha": "bab30c2299617f6615ec02a68b9a40d10bd21366",
|
360
|
+
"version": "v45.0.5"
|
361
|
+
},
|
362
|
+
"tyrrrz/action-http-request": {
|
363
|
+
"name": "tyrrrz/action-http-request",
|
364
|
+
"sha": "64c70c67f5ebc54d4c7ea09cbe3553322778afd5",
|
365
|
+
"version": "1.1.2"
|
261
366
|
},
|
262
367
|
"yogevbd/enforce-label-action": {
|
263
368
|
"name": "yogevbd/enforce-label-action",
|
@@ -58,7 +58,13 @@ class RuleJobEnvironmentPrefix(Rule):
|
|
58
58
|
incorrectly named environment variables.
|
59
59
|
"""
|
60
60
|
correct = True
|
61
|
-
allowed_envs = {
|
61
|
+
allowed_envs = {
|
62
|
+
"NODE_OPTIONS",
|
63
|
+
"NUGET_PACKAGES",
|
64
|
+
"MINT_PATH",
|
65
|
+
"MINT_LINK_PATH",
|
66
|
+
"HUSKY",
|
67
|
+
}
|
62
68
|
|
63
69
|
if obj.env:
|
64
70
|
offending_keys = []
|
@@ -70,4 +76,4 @@ class RuleJobEnvironmentPrefix(Rule):
|
|
70
76
|
if correct:
|
71
77
|
return True, ""
|
72
78
|
|
73
|
-
return False, f"{self.message} ({'
|
79
|
+
return False, f"{self.message} ({', '.join(offending_keys)})"
|
@@ -1,5 +1,6 @@
|
|
1
1
|
"""A Rule to enforce all 'name' values start with a capital letter."""
|
2
2
|
|
3
|
+
import re
|
3
4
|
from typing import Optional, Tuple, Union
|
4
5
|
|
5
6
|
from ..models.job import Job
|
@@ -56,7 +57,7 @@ class RuleNameCapitalized(Rule):
|
|
56
57
|
if obj.name[0] != "_":
|
57
58
|
return obj.name[0].isupper(), self.message
|
58
59
|
else:
|
59
|
-
if obj.name:
|
60
|
+
if obj.name and not re.match(r"^\s*\${{\s*matrix\..*}}.*", obj.name):
|
60
61
|
return obj.name[0].isupper(), self.message
|
61
62
|
|
62
63
|
return True, "" # Force passing
|
@@ -23,7 +23,7 @@ class RuleStepUsesApproved(Rule):
|
|
23
23
|
A Settings object that contains any default, overridden, or custom settings
|
24
24
|
required anywhere in the application.
|
25
25
|
"""
|
26
|
-
self.on_fail = LintLevels.
|
26
|
+
self.on_fail = LintLevels.ERROR
|
27
27
|
self.compatibility = [Step]
|
28
28
|
self.settings = settings
|
29
29
|
|
@@ -82,20 +82,17 @@ class RuleStepUsesApproved(Rule):
|
|
82
82
|
if self.skip(obj):
|
83
83
|
return True, ""
|
84
84
|
|
85
|
+
obj_path = obj.uses_path
|
86
|
+
|
87
|
+
# Remove the action directory if the action is in a multi-actions repo
|
88
|
+
if len(obj.uses_path.split("/")) > 2:
|
89
|
+
obj_path = "/".join(obj.uses_path.split("/")[:-1])
|
90
|
+
|
85
91
|
# Actions in bitwarden/ are auto-approved
|
86
|
-
if obj.uses and not
|
92
|
+
if obj.uses and not obj_path in self.settings.approved_actions:
|
87
93
|
return False, (
|
88
94
|
f"New Action detected: {obj.uses_path}\nFor security purposes, "
|
89
95
|
"actions must be reviewed and be on the pre-approved list"
|
90
96
|
)
|
91
97
|
|
92
|
-
action = self.settings.approved_actions[obj.uses_path]
|
93
|
-
|
94
|
-
if obj.uses_version != action.version or obj.uses_ref != action.sha:
|
95
|
-
return False, (
|
96
|
-
"Action is out of date. Please update to:\n"
|
97
|
-
f" commit: {action.version}"
|
98
|
-
f" version: {action.sha}"
|
99
|
-
)
|
100
|
-
|
101
98
|
return True, ""
|
@@ -103,14 +103,6 @@ class RuleUnderscoreOutputs(Rule):
|
|
103
103
|
for output in obj.outputs.keys():
|
104
104
|
outputs.append(output)
|
105
105
|
|
106
|
-
if isinstance(obj, Step):
|
107
|
-
if obj.run:
|
108
|
-
outputs.extend(
|
109
|
-
re.findall(
|
110
|
-
r"\b([a-zA-Z0-9_-]+)\s*=\s*[^=]*>>\s*\$GITHUB_OUTPUT", obj.run
|
111
|
-
)
|
112
|
-
)
|
113
|
-
|
114
106
|
correct = True
|
115
107
|
offending_keys = []
|
116
108
|
|
@@ -124,5 +116,5 @@ class RuleUnderscoreOutputs(Rule):
|
|
124
116
|
|
125
117
|
return (
|
126
118
|
False,
|
127
|
-
f"{obj.__class__.__name__} {self.message}: ({'
|
119
|
+
f"{obj.__class__.__name__} {self.message}: ({', '.join(offending_keys)})",
|
128
120
|
)
|
{bitwarden_workflow_linter-0.3.0.dist-info → bitwarden_workflow_linter-0.4.0.dist-info}/METADATA
RENAMED
@@ -1,9 +1,10 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: bitwarden_workflow_linter
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.0
|
4
4
|
Summary: Custom GitHub Action Workflow Linter
|
5
5
|
Project-URL: Homepage, https://github.com/bitwarden/workflow-linter
|
6
6
|
Project-URL: Issues, https://github.com/bitwarden/workflow-linter/issues
|
7
|
+
License-File: LICENSE.txt
|
7
8
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
8
9
|
Classifier: Operating System :: OS Independent
|
9
10
|
Classifier: Programming Language :: Python :: 3
|
{bitwarden_workflow_linter-0.3.0.dist-info → bitwarden_workflow_linter-0.4.0.dist-info}/RECORD
RENAMED
@@ -1,8 +1,8 @@
|
|
1
|
-
bitwarden_workflow_linter/__about__.py,sha256=
|
1
|
+
bitwarden_workflow_linter/__about__.py,sha256=Y6syC77IGO4JxX2o2HH_kN6gjgT2uc81ztZluWcw9Ls,59
|
2
2
|
bitwarden_workflow_linter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
bitwarden_workflow_linter/actions.py,sha256=
|
3
|
+
bitwarden_workflow_linter/actions.py,sha256=LAn3yQeMMmCOvJWeTn3dE1U2nyEJqIBMwESq3TtY9hE,9069
|
4
4
|
bitwarden_workflow_linter/cli.py,sha256=wgkK1MlVbo6Zx3f2CZZ_tkSWq_hdsGciHJA1knX6Yuw,1699
|
5
|
-
bitwarden_workflow_linter/default_actions.json,sha256
|
5
|
+
bitwarden_workflow_linter/default_actions.json,sha256=-UcA7x5CmyJGdUEkfkHnHiVpFqffZ4XeojDp08GELJg,11600
|
6
6
|
bitwarden_workflow_linter/default_settings.yaml,sha256=2VwOcB0g3v4A2Kt2UgGFM0TSpfd6S0oNA0SkTa5tGJA,576
|
7
7
|
bitwarden_workflow_linter/lint.py,sha256=RDHv5jGeGCf5XIHE8jyqQET3-cFykl7223SQVS4Q3pg,5525
|
8
8
|
bitwarden_workflow_linter/load.py,sha256=Ece2bwSSYeQ1xQQEjjqY6DlCkwznFYLG56VW_VTxU4E,4472
|
@@ -13,15 +13,15 @@ bitwarden_workflow_linter/models/job.py,sha256=nBK7_VYu6RRST7WLtdLsoRErl5j4Er8W9
|
|
13
13
|
bitwarden_workflow_linter/models/step.py,sha256=1bKAtKZmHcO8O1e_HuoXxR1bwHDEXUssYo7EHOjY7QI,1711
|
14
14
|
bitwarden_workflow_linter/models/workflow.py,sha256=MkqvIY4JX2eWFODNTodS_l4I8uUq08WCHy3C4kYcL0s,1395
|
15
15
|
bitwarden_workflow_linter/rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
bitwarden_workflow_linter/rules/job_environment_prefix.py,sha256=
|
17
|
-
bitwarden_workflow_linter/rules/name_capitalized.py,sha256=
|
16
|
+
bitwarden_workflow_linter/rules/job_environment_prefix.py,sha256=sY1cBU5AeBHWSyun7gwnoS0ycRyBMjjVo_2lvanBj7U,2612
|
17
|
+
bitwarden_workflow_linter/rules/name_capitalized.py,sha256=quuqXM_qg93UE8mQo1YQp8cQ_Fx6c2u03_19s_c0ntw,1981
|
18
18
|
bitwarden_workflow_linter/rules/name_exists.py,sha256=MxcaNQz64JXeHRPiOip9BxJNgPdpKQa7Z51mDoNw2hU,1681
|
19
19
|
bitwarden_workflow_linter/rules/pinned_job_runner.py,sha256=Dm6_sdPX0yFMji_y2LMFj4gWFaToEgauyBVpNRP2qiI,1606
|
20
|
-
bitwarden_workflow_linter/rules/step_approved.py,sha256=
|
21
|
-
bitwarden_workflow_linter/rules/step_pinned.py,sha256=
|
22
|
-
bitwarden_workflow_linter/rules/underscore_outputs.py,sha256=
|
23
|
-
bitwarden_workflow_linter-0.
|
24
|
-
bitwarden_workflow_linter-0.
|
25
|
-
bitwarden_workflow_linter-0.
|
26
|
-
bitwarden_workflow_linter-0.
|
27
|
-
bitwarden_workflow_linter-0.
|
20
|
+
bitwarden_workflow_linter/rules/step_approved.py,sha256=6XuYoasw2ME8vQu5G0ZygUSi7X5amLLWeXH81cqvKv8,3159
|
21
|
+
bitwarden_workflow_linter/rules/step_pinned.py,sha256=fyqBjarR0UNQ6tU_ja0ZOi2afP942BMqOz5nU_yKzmw,3413
|
22
|
+
bitwarden_workflow_linter/rules/underscore_outputs.py,sha256=w8pP1dTJEC9I2X5fQIAHDAEiaNP1xMhb4kPiF-dn8U0,4131
|
23
|
+
bitwarden_workflow_linter-0.4.0.dist-info/METADATA,sha256=q6VsW3ul6IUWvzc7B8iW4HmRYwyGSqW1v1sk8K0JCL4,6172
|
24
|
+
bitwarden_workflow_linter-0.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
25
|
+
bitwarden_workflow_linter-0.4.0.dist-info/entry_points.txt,sha256=SA_yF9CwL4VMUvdcmCd7k9rjsQNzfeOUBuDnMnaO8QQ,60
|
26
|
+
bitwarden_workflow_linter-0.4.0.dist-info/licenses/LICENSE.txt,sha256=uY-7N9tbI7xc_c0WeTIGpacSCnsB91N05eCIg3bkaRw,35140
|
27
|
+
bitwarden_workflow_linter-0.4.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|