Skip to content

Commit 3949d75

Browse files
[StepSecurity] Apply security best practices (#251)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> Co-authored-by: stepsecurity-app[bot] <188008098+stepsecurity-app[bot]@users.noreply.github.com>
1 parent a78345b commit 3949d75

9 files changed

Lines changed: 35 additions & 27 deletions

File tree

.github/workflows/ast-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
cx-scan:
13-
runs-on: ubuntu-latest
13+
runs-on: cx-public-ubuntu-x64
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

.github/workflows/auto-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ permissions:
66

77
jobs:
88
dependabot-merge:
9-
runs-on: ubuntu-latest
9+
runs-on: cx-public-ubuntu-x64
1010
if: contains(github.head_ref, 'other/update_java_wrapper')
1111
steps:
1212
- name: Enable auto-merge for Dependabot PRs

.github/workflows/ci.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ on:
77
jobs:
88

99
ui-tests:
10-
runs-on: ubuntu-latest
10+
runs-on: cx-public-ubuntu-x64
1111
steps:
12-
- uses: actions/checkout@v3.5.2
12+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
1313
with:
1414
lfs: true
1515
- name: Checkout LFS objects
1616
run: git lfs checkout
17-
- uses: actions/setup-java@v4
17+
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
1818
with:
1919
distribution: temurin
2020
java-version: 17
21-
- uses: actions/cache@v3
21+
- uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
2222
with:
2323
path: ~/.m2/repository
2424
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -34,7 +34,7 @@ jobs:
3434
Xvfb -ac :99 -screen 0 1920x1080x16 &
3535
mvn verify -Dtest.includes="**/ui/*.java"
3636
- name: Upload Coverage Report
37-
uses: actions/upload-artifact@v4
37+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3838
with:
3939
name: jacoco-coverage-report-ui
4040
path: checkmarx-ast-eclipse-plugin-tests/target/site/jacoco-aggregate
@@ -44,18 +44,18 @@ jobs:
4444
jacoco-csv-file: checkmarx-ast-eclipse-plugin-tests/target/site/jacoco-aggregate/jacoco.csv
4545
generate-summary: true
4646
integration-tests:
47-
runs-on: ubuntu-latest
47+
runs-on: cx-public-ubuntu-x64
4848
steps:
49-
- uses: actions/checkout@v3.5.2
49+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
5050
with:
5151
lfs: true
5252
- name: Checkout LFS objects
5353
run: git lfs checkout
54-
- uses: actions/setup-java@v4
54+
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
5555
with:
5656
distribution: temurin
5757
java-version: 17
58-
- uses: actions/cache@v3
58+
- uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
5959
with:
6060
path: ~/.m2/repository
6161
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -71,7 +71,7 @@ jobs:
7171
Xvfb -ac :99 -screen 0 1920x1080x16 &
7272
mvn verify -Dtest.includes="**/integration/*Test.java"
7373
- name: Upload Coverage Report
74-
uses: actions/upload-artifact@v4
74+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7575
with:
7676
name: jacoco-coverage-report-integration
7777
path: checkmarx-ast-eclipse-plugin-tests/target/site/jacoco-aggregate
@@ -81,18 +81,18 @@ jobs:
8181
jacoco-csv-file: checkmarx-ast-eclipse-plugin-tests/target/site/jacoco-aggregate/jacoco.csv
8282
generate-summary: true
8383
unit-tests:
84-
runs-on: ubuntu-latest
84+
runs-on: cx-public-ubuntu-x64
8585
steps:
86-
- uses: actions/checkout@v3.5.2
86+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
8787
with:
8888
lfs: true
8989
- name: Checkout LFS objects
9090
run: git lfs checkout
91-
- uses: actions/setup-java@v4
91+
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
9292
with:
9393
distribution: temurin
9494
java-version: 17
95-
- uses: actions/cache@v3
95+
- uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
9696
with:
9797
path: ~/.m2/repository
9898
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -108,7 +108,7 @@ jobs:
108108
Xvfb -ac :99 -screen 0 1920x1080x16 &
109109
mvn clean verify -Dtest.includes="**/unit/**/*Test.java"
110110
- name: Upload Coverage Report
111-
uses: actions/upload-artifact@v4
111+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
112112
with:
113113
name: jacoco-coverage-report-unit
114114
path: checkmarx-ast-eclipse-plugin-tests/target/site/jacoco-aggregate

.github/workflows/delete-dev-releases.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ permissions:
2020

2121
jobs:
2222
delete:
23-
runs-on: ubuntu-latest
23+
runs-on: cx-public-ubuntu-x64
2424
steps:
2525

2626
- name: Delete releases and tags

.github/workflows/manual-tag.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ on:
77
description: 'Next release tag'
88
required: true
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
tag-creation:
12-
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write # for Git to git push
17+
runs-on: cx-public-ubuntu-x64
1318
steps:
1419
- name: Checkout
15-
uses: actions/checkout@v3.5.2
20+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
1621
with:
1722
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
1823
- name: Tag

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
set_tag:
10-
runs-on: ubuntu-latest
10+
runs-on: cx-public-ubuntu-x64
1111
outputs:
1212
tag_name: ${{ steps.tagname.outputs.tag_name }}
1313
steps:

.github/workflows/pr-label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
pr-labeler:
1111
permissions:
1212
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
13-
runs-on: ubuntu-latest
13+
runs-on: cx-public-ubuntu-x64
1414
steps:
1515
- uses: TimonVS/pr-labeler-action@8b99f404a073744885d8021d1de4e40c6eaf38e2 # v4
1616
with:

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
secrets: inherit
3939
if: inputs.rbranch
4040
release:
41-
runs-on: ubuntu-latest
41+
runs-on: cx-public-ubuntu-x64
4242
outputs:
4343
TAG_NAME: ${{ steps.generate_tag_name.outputs.TAG_NAME }}
4444
CLI_VERSION: ${{ steps.set_outputs.outputs.CLI_VERSION }}
@@ -75,13 +75,13 @@ jobs:
7575
echo "TAG_NAME=$GH_RELEASE_TAG_NAME" >> $GITHUB_OUTPUT
7676
7777
- name: Set up JDK 17
78-
uses: actions/setup-java@v4
78+
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
7979
with:
8080
distribution: temurin
8181
java-version: 17
8282

8383
- name: Cache local Maven repository
84-
uses: actions/cache@v3
84+
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
8585
with:
8686
path: ~/.m2/repository
8787
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

.github/workflows/update-cli.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ on:
44
repository_dispatch:
55
types: [java-wrapper-version-update]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
update-checkmarx-cli:
9-
runs-on: ubuntu-latest
12+
runs-on: cx-public-ubuntu-x64
1013
steps:
11-
- uses: actions/checkout@v4.1.7
14+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1215
with:
1316
lfs: true
1417

0 commit comments

Comments
 (0)