Skip to content

Commit 19dc598

Browse files
committed
#151: addressing Aquasec findings
1 parent 93d1619 commit 19dc598

File tree

6 files changed

+33
-17
lines changed

6 files changed

+33
-17
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545
scala: [2.12.17, 2.13.12]
4646
steps:
4747
- name: Checkout code
48-
uses: actions/checkout@v2
48+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
4949
- name: Setup Scala
50-
uses: olafurpg/setup-scala@v14
50+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
5151
with:
5252
java-version: "[email protected]"
5353
- name: Build and run unit tests

.github/workflows/dependent_items.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
name: Dependent Items Check
2929
runs-on: ubuntu-latest
3030
steps:
31-
- uses: z0al/dependent-issues@v1.5.2
31+
- uses: z0al/dependent-issues@950226e7ca8fc43dc209a7febf67c655af3bdb43
3232
env:
3333
# (Required) The token to use to make API calls to GitHub.
3434
GITHUB_TOKEN: ${{ secrets.PAT_REPO_PROJECT_DISCUSS }}

.github/workflows/jacoco_report.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,50 +49,57 @@ jobs:
4949

5050
steps:
5151
- name: Checkout code
52-
uses: actions/checkout@v4
52+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
53+
5354
- name: Setup Scala
54-
uses: olafurpg/setup-scala@v14
55+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
5556
with:
5657
java-version: "[email protected]"
58+
5759
- name: Prepare testing database
5860
run: sbt flywayMigrate
61+
5962
- name: Build and run tests
6063
continue-on-error: true
6164
id: jacocorun
6265
run: sbt ++${{env.scalaLong}} jacoco
66+
6367
- name: Add coverage to PR (core)
6468
if: steps.jacocorun.outcome == 'success'
6569
id: jacoco-core
66-
uses: madrapps/jacoco-report@v1.6.1
70+
uses: madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
6771
with:
6872
paths: ${{ github.workspace }}/core/target/scala-${{ env.scalaShort }}/jacoco/report/jacoco.xml
6973
token: ${{ secrets.GITHUB_TOKEN }}
7074
min-coverage-overall: ${{ env.coverage-overall }}
7175
min-coverage-changed-files: ${{ env.coverage-changed-files }}
7276
title: JaCoCo `core` module code coverage report - scala ${{ env.scalaLong }}
7377
update-comment: true
78+
7479
- name: Add coverage to PR (doobie)
7580
if: steps.jacocorun.outcome == 'success'
7681
id: jacoco-doobie
77-
uses: madrapps/jacoco-report@v1.6.1
82+
uses: madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
7883
with:
7984
paths: ${{ github.workspace }}/doobie/target/scala-${{ env.scalaShort }}/jacoco/report/jacoco.xml
8085
token: ${{ secrets.GITHUB_TOKEN }}
8186
min-coverage-overall: ${{ env.coverage-overall }}
8287
min-coverage-changed-files: ${{ env.coverage-changed-files }}
8388
title: JaCoCo `doobie` module code coverage report - scala ${{ env.scalaLong }}
8489
update-comment: true
90+
8591
- name: Add coverage to PR (slick)
8692
if: steps.jacocorun.outcome == 'success'
8793
id: jacoco-slick
88-
uses: madrapps/jacoco-report@v1.6.1
94+
uses: madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
8995
with:
9096
paths: ${{ github.workspace }}/slick/target/scala-${{ env.scalaShort }}/jacoco/report/jacoco.xml
9197
token: ${{ secrets.GITHUB_TOKEN }}
9298
min-coverage-overall: ${{env.coverage-overall }}
9399
min-coverage-changed-files: ${{ env.coverage-changed-files }}
94100
title: JaCoCo `slick` module code coverage report - scala ${{ env.scalaLong }}
95101
update-comment: true
102+
96103
- name: Get the Coverage info
97104
if: steps.jacocorun.outcome == 'success'
98105
run: |
@@ -102,9 +109,10 @@ jobs:
102109
echo "Changed Files coverage ${{ steps.jacoco-doobie.outputs.coverage-changed-files }}"
103110
echo "Total `slick` module coverage ${{ steps.jacoco-slick.outputs.coverage-overall }}"
104111
echo "Changed Files coverage ${{ steps.jacoco-slick.outputs.coverage-changed-files }}"
112+
105113
- name: Fail PR if changed files coverage is less than ${{ env.coverage-changed-files }}%
106114
if: steps.jacocorun.outcome == 'success'
107-
uses: actions/github-script@v6
115+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
108116
with:
109117
script: |
110118
const coverageCheckFailed =
@@ -114,9 +122,10 @@ jobs:
114122
if (coverageCheckFailed) {
115123
core.setFailed('Changed files coverage is less than ${{ env.coverage-changed-files }}%!');
116124
}
125+
117126
- name: Fail PR if overall files coverage is less than ${{ env.coverage-overall }}%
118127
if: ${{ (steps.jacocorun.outcome == 'success') && (env.check-overall-coverages == 'true') }}
119-
uses: actions/github-script@v6
128+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
120129
with:
121130
script: |
122131
const coverageCheckFailed =
@@ -126,9 +135,10 @@ jobs:
126135
if (coverageCheckFailed) {
127136
core.setFailed('Overall coverage is less than ${{ env.coverage-overall }}%!');
128137
}
138+
129139
- name: Edit JaCoCo comments on build failure
130140
if: steps.jacocorun.outcome != 'success'
131-
uses: actions/github-script@v6
141+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
132142
with:
133143
script: |
134144
const issue_number = context.issue.number;

.github/workflows/license_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Checkout code
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
3333
- name: Setup Scala
34-
uses: olafurpg/setup-scala@v10
34+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
3535
with:
3636
java-version: "[email protected]"
3737
- run: sbt headerCheck

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@ jobs:
2222
publish:
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/[email protected]
25+
- name: Checkout code
26+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
2627
with:
2728
fetch-depth: 0
28-
- uses: olafurpg/setup-scala@v13
29+
30+
- name: Setup Scala
31+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
32+
with:
33+
java-version: "[email protected]"
34+
2935
- run: sbt ci-release
3036
env:
3137
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}

.github/workflows/test_filenames_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout code
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
3131

3232
- name: Filename Inspector
3333
id: scan-test-files
34-
uses: AbsaOSS/filename-inspector@v0.1.0
34+
uses: AbsaOSS/filename-inspector@355108975e656fac9faaa04209b6df3f9997c8fa
3535
with:
3636
name-patterns: '*UnitTests.*,*IntegrationTests.*'
3737
paths: '**/src/test/scala/**'

0 commit comments

Comments
 (0)