Skip to content

Commit bbf22de

Browse files
committed
Address zizmor GitHub Actions findings
Fixes findings identified by zizmor (https://github.com/zizmorcore/zizmor) Signed-off-by: nscuro <nscuro@protonmail.com>
1 parent 3fd3198 commit bbf22de

7 files changed

Lines changed: 23 additions & 17 deletions

File tree

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "daily"
7+
cooldown:
8+
default-days: 7
79

810
- package-ecosystem: "github-actions"
911
directory: "/"
1012
schedule:
1113
interval: "daily"
14+
cooldown:
15+
default-days: 7

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- name: Checkout repository
2323
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
2424
with:
25+
persist-credentials: false
2526
# We must fetch at least the immediate parents so that if this is
2627
# a pull request then we can checkout the head.
2728
fetch-depth: 2

.github/workflows/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
timeout-minutes: 30
1818
steps:
1919
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
20+
with:
21+
persist-credentials: false
2022
- name: Set up JDK
2123
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # tag=v5.2.0
2224
with:

.github/workflows/maven.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
steps:
2222
- name: Checkout Repository
2323
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
24+
with:
25+
persist-credentials: false
2426
- name: Set up JDK ${{ matrix.java-version }}
2527
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # tag=v5.2.0
2628
with:

.github/workflows/pr-test-coverage.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ jobs:
2424
github-token: ${{ secrets.GITHUB_TOKEN }}
2525
run-id: ${{ github.event.workflow_run.id }}
2626
- name: Report Coverage to Codacy
27+
env:
28+
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
29+
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
2730
run: |-
2831
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
29-
--project-token ${{ secrets.CODACY_PROJECT_TOKEN }} \
30-
--commit-uuid ${{ github.event.workflow_run.head_sha }} \
32+
--project-token "${CODACY_PROJECT_TOKEN}" \
33+
--commit-uuid "${COMMIT_SHA}" \
3134
--coverage-reports ./jacoco.xml \
3235
--language Java

.github/workflows/publish-snapshot.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ permissions: {}
66

77
jobs:
88
build:
9-
109
runs-on: ubuntu-latest
1110

1211
permissions:
1312
contents: write # for git-push after version modifications
1413

1514
steps:
1615
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
16+
with:
17+
persist-credentials: false
1718
- name: Set up JDK
1819
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # tag=v5.2.0
1920
with:

.github/workflows/release.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,18 @@ jobs:
4040
git config --global user.email "info@cyclonedx.org"
4141
git config --global user.name "CycloneDX Automation"
4242
43-
- name: Set Maven options
44-
id: maven_options
45-
run: |
46-
# Set the Maven options based on the 'dry_run' input
47-
if ${{ github.event.inputs.dry_run }}; then
48-
echo "options=release:prepare -DdryRun=true" >> $GITHUB_ENV
49-
else
50-
echo "options=release:clean release:prepare release:perform" >> $GITHUB_ENV
51-
fi
52-
5343
- name: Run Maven command
54-
run: |
55-
mvn -B ${{ env.options }}
5644
env:
45+
DRY_RUN: ${{ github.event.inputs.dry_run }}
5746
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
5847
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
5948
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
60-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
run: |-
50+
if [ "$DRY_RUN" = "true" ]; then
51+
mvn -B release:prepare -DdryRun=true
52+
else
53+
mvn -B release:clean release:prepare release:perform
54+
fi
6155
continue-on-error: ${{ github.event.inputs.dry_run == false }}
6256

6357
- name: Rollback if release fails
@@ -69,4 +63,3 @@ jobs:
6963
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
7064
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
7165
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
72-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)