Commit 9de7121
committed
Update GHA GITHUB_TOKEN Permissions
Why these changes are being introduced:
There is a potential conflict between GITHUB_TOKEN permissions declared
in a caller workflow (like this) and the shared workflow that is being
called. After testing various combinations, the end result is as simple
as setting the correct GITHUB_TOKEN permissions in the shared workflow
and not declaring any permissions in the calling workflow. If there is
some need to declare GITHUB_TOKEN permissions in the calling workflow,
they MUST match the permissions in the shared workflow.
Since checkov will throw a warning if no permissions are declared at all
there is a checkov:skip comment in the caller workflow. Sadly, for an
unknown reason, checkov doesn't register this skip comment and still
shows a warning.
How this addresses that need:
* Remove all permissions declared in the caller workflows
* Add a checkov:skip comment in the workflows, even though it doesn't
properly work (this at least lets any future developer know that there
is a good reason for not having a permissions statement in the yaml)
Side effects of this change:
None.
Related Jira Tickets:
* https://mitlibraries.atlassian.net/browse/IR-2381 parent d847de6 commit 9de7121
File tree
3 files changed
+15
-34
lines changed- .github/workflows
3 files changed
+15
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 18 | | |
25 | | - | |
| 19 | + | |
26 | 20 | | |
27 | 21 | | |
28 | 22 | | |
29 | 23 | | |
30 | 24 | | |
31 | | - | |
32 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | | - | |
12 | | - | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 16 | | |
21 | 17 | | |
22 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 18 | | |
25 | 19 | | |
26 | 20 | | |
27 | 21 | | |
28 | 22 | | |
29 | 23 | | |
30 | 24 | | |
31 | | - | |
32 | | - | |
| 25 | + | |
0 commit comments