Skip to content

Commit 5641239

Browse files
authored
Fix: Ci/Cd permissions for security events in build_tiber.yml (#11)
Added scans on push action so that issues will be removed on merge: * Fix: Ci/Cd permissions for security events in build_tiber.yml * Update linters.yml * Update dependency-review.yaml * Update ci_documentation_update.yml
1 parent 4ce807d commit 5641239

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

.github/workflows/build_tiber.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
runs-on: ubuntu-22.04
2929
timeout-minutes: 120
3030
permissions:
31+
contents: read
3132
security-events: write
3233
steps:
3334
- name: "Preparation: Harden Runner"
@@ -79,8 +80,8 @@ jobs:
7980
uses: aquasecurity/trivy-action@595be6a0f6560a0a8fc419ddf630567fc623531d # v0.22.0
8081
with:
8182
image-ref: "${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_IMAGE_TAG }}"
82-
format: "sarif"
8383
output: "trivy-image-scan-tiber-${{ env.DOCKER_IMAGE_TAG }}.sarif"
84+
format: "sarif"
8485

8586
- name: "Finish: Upload Trivy scan results to GitHub Security tab"
8687
uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
@@ -91,6 +92,7 @@ jobs:
9192
name: "trivy config scans"
9293
runs-on: ubuntu-22.04
9394
permissions:
95+
contents: read
9496
security-events: write
9597
steps:
9698
- name: "Preparation: Harden Runner"
@@ -121,6 +123,7 @@ jobs:
121123
name: "trivy fs scans"
122124
runs-on: ubuntu-22.04
123125
permissions:
126+
contents: read
124127
security-events: write
125128
steps:
126129
- name: "Preparation: Harden Runner"

.github/workflows/ci_documentation_update.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Publish Github Pages Template
22

33
on:
4+
push:
5+
branches: [ 'main' ]
46
workflow_call:
57
workflow_dispatch:
68
inputs:

.github/workflows/dependency-review.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# Source repository: https://github.com/actions/dependency-review-action
22
name: scan-dependency-review
3-
on: [pull_request]
3+
on:
4+
pull_request:
5+
branches: [ 'main' ]
6+
push:
7+
branches: [ 'main' ]
48

59
permissions:
610
contents: read
711

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
14+
cancel-in-progress: true
15+
816
jobs:
917
dependency-review:
1018
runs-on: ubuntu-latest

.github/workflows/linters.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
workflow_call:
55
workflow_dispatch:
66
pull_request:
7+
branches: [ 'main' ]
8+
push:
9+
branches: [ 'main' ]
710

811
env:
912
HADOLINT_RESULTS_FILE: hadolint.sarif

0 commit comments

Comments
 (0)