Skip to content

Commit 201f48b

Browse files
authored
#151: addressing Aquasec findings (#152)
* #151: addressing Aquasec findings * Aquasec related automation we implement in each repo as our standard (just PR generation, not auto merge, frequency: each Sunday)
1 parent 93d1619 commit 201f48b

File tree

7 files changed

+77
-17
lines changed

7 files changed

+77
-17
lines changed

.github/dependabot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
target-branch: "master"
6+
schedule:
7+
interval: "weekly"
8+
day: "sunday"
9+
labels:
10+
- "auto update"
11+
- "infrastructure"
12+
- "no RN"
13+
open-pull-requests-limit: 3
14+
commit-message:
15+
prefix: "chore"
16+
include: "scope"
17+
18+
- package-ecosystem: "sbt"
19+
directory: "/"
20+
target-branch: "master"
21+
schedule:
22+
interval: "weekly"
23+
day: "sunday"
24+
labels:
25+
- "auto update"
26+
- "dependencies"
27+
- "no RN"
28+
open-pull-requests-limit: 3
29+
commit-message:
30+
prefix: "chore"
31+
include: "scope"

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,15 @@ 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
49+
with:
50+
persist-credentials: false
51+
4952
- name: Setup Scala
50-
uses: olafurpg/setup-scala@v14
53+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
5154
with:
5255
java-version: "adopt@1.8"
56+
5357
- name: Build and run unit tests
5458
run: sbt ++${{matrix.scala}} test
5559
- name: Generate documentation

.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: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,50 +49,59 @@ jobs:
4949

5050
steps:
5151
- name: Checkout code
52-
uses: actions/checkout@v4
52+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
53+
with:
54+
persist-credentials: false
55+
5356
- name: Setup Scala
54-
uses: olafurpg/setup-scala@v14
57+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
5558
with:
5659
java-version: "adopt@1.8"
60+
5761
- name: Prepare testing database
5862
run: sbt flywayMigrate
63+
5964
- name: Build and run tests
6065
continue-on-error: true
6166
id: jacocorun
6267
run: sbt ++${{env.scalaLong}} jacoco
68+
6369
- name: Add coverage to PR (core)
6470
if: steps.jacocorun.outcome == 'success'
6571
id: jacoco-core
66-
uses: madrapps/jacoco-report@v1.6.1
72+
uses: madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
6773
with:
6874
paths: ${{ github.workspace }}/core/target/scala-${{ env.scalaShort }}/jacoco/report/jacoco.xml
6975
token: ${{ secrets.GITHUB_TOKEN }}
7076
min-coverage-overall: ${{ env.coverage-overall }}
7177
min-coverage-changed-files: ${{ env.coverage-changed-files }}
7278
title: JaCoCo `core` module code coverage report - scala ${{ env.scalaLong }}
7379
update-comment: true
80+
7481
- name: Add coverage to PR (doobie)
7582
if: steps.jacocorun.outcome == 'success'
7683
id: jacoco-doobie
77-
uses: madrapps/jacoco-report@v1.6.1
84+
uses: madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
7885
with:
7986
paths: ${{ github.workspace }}/doobie/target/scala-${{ env.scalaShort }}/jacoco/report/jacoco.xml
8087
token: ${{ secrets.GITHUB_TOKEN }}
8188
min-coverage-overall: ${{ env.coverage-overall }}
8289
min-coverage-changed-files: ${{ env.coverage-changed-files }}
8390
title: JaCoCo `doobie` module code coverage report - scala ${{ env.scalaLong }}
8491
update-comment: true
92+
8593
- name: Add coverage to PR (slick)
8694
if: steps.jacocorun.outcome == 'success'
8795
id: jacoco-slick
88-
uses: madrapps/jacoco-report@v1.6.1
96+
uses: madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
8997
with:
9098
paths: ${{ github.workspace }}/slick/target/scala-${{ env.scalaShort }}/jacoco/report/jacoco.xml
9199
token: ${{ secrets.GITHUB_TOKEN }}
92100
min-coverage-overall: ${{env.coverage-overall }}
93101
min-coverage-changed-files: ${{ env.coverage-changed-files }}
94102
title: JaCoCo `slick` module code coverage report - scala ${{ env.scalaLong }}
95103
update-comment: true
104+
96105
- name: Get the Coverage info
97106
if: steps.jacocorun.outcome == 'success'
98107
run: |
@@ -102,9 +111,10 @@ jobs:
102111
echo "Changed Files coverage ${{ steps.jacoco-doobie.outputs.coverage-changed-files }}"
103112
echo "Total `slick` module coverage ${{ steps.jacoco-slick.outputs.coverage-overall }}"
104113
echo "Changed Files coverage ${{ steps.jacoco-slick.outputs.coverage-changed-files }}"
114+
105115
- name: Fail PR if changed files coverage is less than ${{ env.coverage-changed-files }}%
106116
if: steps.jacocorun.outcome == 'success'
107-
uses: actions/github-script@v6
117+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
108118
with:
109119
script: |
110120
const coverageCheckFailed =
@@ -114,9 +124,10 @@ jobs:
114124
if (coverageCheckFailed) {
115125
core.setFailed('Changed files coverage is less than ${{ env.coverage-changed-files }}%!');
116126
}
127+
117128
- name: Fail PR if overall files coverage is less than ${{ env.coverage-overall }}%
118129
if: ${{ (steps.jacocorun.outcome == 'success') && (env.check-overall-coverages == 'true') }}
119-
uses: actions/github-script@v6
130+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
120131
with:
121132
script: |
122133
const coverageCheckFailed =
@@ -126,9 +137,10 @@ jobs:
126137
if (coverageCheckFailed) {
127138
core.setFailed('Overall coverage is less than ${{ env.coverage-overall }}%!');
128139
}
140+
129141
- name: Edit JaCoCo comments on build failure
130142
if: steps.jacocorun.outcome != 'success'
131-
uses: actions/github-script@v6
143+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
132144
with:
133145
script: |
134146
const issue_number = context.issue.number;

.github/workflows/license_check.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Checkout code
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
33+
with:
34+
persist-credentials: false
35+
3336
- name: Setup Scala
34-
uses: olafurpg/setup-scala@v10
37+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
3538
with:
3639
java-version: "adopt@1.8"
40+
3741
- run: sbt headerCheck

.github/workflows/release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ jobs:
2222
publish:
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v2.3.4
25+
- name: Checkout code
26+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
2627
with:
2728
fetch-depth: 0
28-
- uses: olafurpg/setup-scala@v13
29+
persist-credentials: false
30+
31+
- name: Setup Scala
32+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
33+
with:
34+
java-version: "adopt@1.8"
35+
2936
- run: sbt ci-release
3037
env:
3138
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}

.github/workflows/test_filenames_check.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout code
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
31+
with:
32+
persist-credentials: false
3133

3234
- name: Filename Inspector
3335
id: scan-test-files
34-
uses: AbsaOSS/filename-inspector@v0.1.0
36+
uses: AbsaOSS/filename-inspector@355108975e656fac9faaa04209b6df3f9997c8fa
3537
with:
3638
name-patterns: '*UnitTests.*,*IntegrationTests.*'
3739
paths: '**/src/test/scala/**'

0 commit comments

Comments
 (0)