Skip to content

Commit 34b49e8

Browse files
authored
Merge pull request #456 from validatedpatterns/main
sync: main to rhdp-deploy
2 parents 588525d + 23e2349 commit 34b49e8

File tree

12 files changed

+105
-16
lines changed

12 files changed

+105
-16
lines changed

.github/linters/trivy.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Ignores are in .trivyignore
2+
scan:
3+
scanners:
4+
- vuln
5+
- secret
6+
- config
7+
severities:
8+
- MEDIUM
9+
- CRITICAL
10+
- HIGH

.github/workflows/ansible-lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ on: [push, pull_request]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
810

911
steps:
1012
# Important: This sets up your GITHUB_WORKSPACE environment variable
1113
- uses: actions/checkout@v5
14+
with:
15+
persist-credentials: false
1216

1317
- name: Lint Ansible Playbook
1418
uses: ansible/ansible-lint@50373efb440dd3b524956c075af715cd00eaf20b

.github/workflows/jsonschema.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ jobs:
1010
matrix:
1111
python-version: [3.11]
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
1315

1416
steps:
1517
- name: Checkout Code
1618
uses: actions/checkout@v5
19+
with:
20+
persist-credentials: false
1721

1822
- name: Set up Python ${{ matrix.python-version }}
1923
uses: actions/setup-python@v5
@@ -26,7 +30,7 @@ jobs:
2630
pip install check-jsonschema
2731
2832
- name: Install yq
29-
uses: chrisdickinson/setup-yq@latest
33+
uses: chrisdickinson/setup-yq@fa3192edd79d6eb0e4e12de8dde3a0c26f2b853b # 2025-08-25
3034
with:
3135
yq-version: v4.30.7
3236

.github/workflows/superlinter.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,23 @@ jobs:
99
name: Super linter
1010
# Set the agent to run on
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
statuses: write
1215

1316
steps:
1417
- name: Checkout Code
1518
uses: actions/checkout@v5
1619
with:
1720
# Full git history is needed to get a proper list of changed files within `super-linter`
1821
fetch-depth: 0
22+
persist-credentials: false
1923

2024
################################
2125
# Run Linter against code base #
2226
################################
2327
- name: Lint Code Base
24-
uses: super-linter/super-linter/slim@v7
28+
uses: super-linter/super-linter/slim@ffde3b2b33b745cb612d787f669ef9442b1339a6 # v8.1.0
2529
env:
2630
VALIDATE_ALL_CODEBASE: true
2731
DEFAULT_BRANCH: main
@@ -33,7 +37,6 @@ jobs:
3337
VALIDATE_JSCPD: false
3438
VALIDATE_JSON_PRETTIER: false
3539
VALIDATE_MARKDOWN_PRETTIER: false
36-
VALIDATE_KUBERNETES_KUBECONFORM: false
3740
VALIDATE_PYTHON_PYLINT: false
3841
VALIDATE_SHELL_SHFMT: false
3942
VALIDATE_YAML: false

.github/workflows/sync-rhdp-branch.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,21 @@ jobs:
1313
github.repository_owner == 'validatedpatterns'
1414
runs-on: ubuntu-latest
1515
name: Git Sync branch
16+
permissions:
17+
contents: write
18+
pull-requests: write
1619
steps:
1720
- name: Checkout
1821
uses: actions/checkout@v5
22+
with:
23+
persist-credentials: false
1924
- name: Set up Node
2025
uses: actions/setup-node@v4
2126
with:
2227
node-version: 20
2328
- name: Opening pull request
2429
id: pull
25-
uses: mbaldessari/[email protected]
30+
uses: mbaldessari/git-sync-branch@dd2adf0ca96e52c64716d83cabe85fac33201e12 # v0.2.0
2631
with:
2732
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2833
FROM_BRANCH: "main"

.github/workflows/update-metadata.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ jobs:
1818
contents: read # Required for "read-all"
1919
packages: write # Allows writing to packages
2020
id-token: write # Allows creating OpenID Connect (OIDC) tokens
21-
secrets: inherit
21+
secrets:
22+
DOCS_TOKEN: ${{ secrets.DOCS_TOKEN }}
2223
# For testing you can point to a different branch in the docs repository
2324
# with:
2425
# DOCS_BRANCH: "main"

.trivyignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
AVD-KSV-0110 # Missing namespace is not needed with ArgoCD
2+
AVD-KSV-0020 # Container 'apache' of Deployment 'hello-world' should set 'securityContext.runAsUser' > 10000. Not needed on OCP
3+
AVD-KSV-0021 # Container 'apache' of Deployment 'hello-world' should set 'securityContext.runAsGroup' > 10000. Not needed on OCP
4+
AVD-KSV-0014 # Readonly root filesystem does not work with httpd ubi images
5+
AVD-KSV-0125 # Container apache in deployment hello-world (namespace: default) uses an image from an untrusted registry. registry.access.redhat.com is trusted
6+
7+

charts/all/config-demo/templates/config-demo-deployment.yaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ spec:
1818
deploymentconfig: config-demo
1919
name: config-demo
2020
spec:
21+
securityContext:
22+
runAsNonRoot: true
23+
seccompProfile:
24+
type: RuntimeDefault
2125
containers:
2226
- name: apache
23-
image: registry.access.redhat.com/ubi8/httpd-24:1-226
27+
image: registry.access.redhat.com/ubi10/httpd-24:10.0-1755779646
2428
#imagePullPolicy: Always
2529
ports:
2630
- containerPort: 8080
@@ -32,7 +36,28 @@ spec:
3236
- mountPath: /var/www/html/secret
3337
readOnly: true
3438
name: config-demo-secret
35-
resources: {}
39+
- mountPath: /tmp
40+
name: tmp-volume
41+
- mountPath: /var/cache/httpd
42+
name: cache-volume
43+
- mountPath: /var/run/httpd
44+
name: run-volume
45+
resources:
46+
requests:
47+
cpu: 100m
48+
memory: 128Mi
49+
limits:
50+
cpu: 500m
51+
memory: 256Mi
52+
securityContext:
53+
allowPrivilegeEscalation: false
54+
readOnlyRootFilesystem: false
55+
runAsNonRoot: true
56+
capabilities:
57+
drop:
58+
- ALL
59+
seccompProfile:
60+
type: RuntimeDefault
3661
terminationMessagePath: /dev/termination-log
3762
terminationMessagePolicy: File
3863
livenessProbe:
@@ -63,3 +88,9 @@ spec:
6388
- name: config-demo-secret
6489
secret:
6590
secretName: config-demo-secret
91+
- name: tmp-volume
92+
emptyDir: {}
93+
- name: cache-volume
94+
emptyDir: {}
95+
- name: run-volume
96+
emptyDir: {}

charts/all/hello-world/templates/hello-world-deployment.yaml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ spec:
1717
deploymentconfig: hello-world
1818
name: hello-world
1919
spec:
20+
securityContext:
21+
runAsNonRoot: true
22+
seccompProfile:
23+
type: RuntimeDefault
2024
containers:
2125
- name: apache
22-
image: registry.access.redhat.com/ubi8/httpd-24:1-226
26+
image: registry.access.redhat.com/ubi10/httpd-24:10.0-1755779646
2327
#imagePullPolicy: Always
2428
ports:
2529
- containerPort: 8080
@@ -28,7 +32,27 @@ spec:
2832
volumeMounts:
2933
- mountPath: /var/www/html
3034
name: hello-world-configmap
31-
resources: {}
35+
- mountPath: /tmp
36+
name: tmp-volume
37+
- mountPath: /var/cache/httpd
38+
name: cache-volume
39+
- mountPath: /var/run/httpd
40+
name: run-volume
41+
resources:
42+
requests:
43+
cpu: 100m
44+
memory: 128Mi
45+
limits:
46+
cpu: 500m
47+
memory: 256Mi
48+
securityContext:
49+
allowPrivilegeEscalation: false
50+
runAsNonRoot: true
51+
seccompProfile:
52+
type: RuntimeDefault
53+
capabilities:
54+
drop:
55+
- ALL
3256
terminationMessagePath: /dev/termination-log
3357
terminationMessagePolicy: File
3458
livenessProbe:
@@ -56,3 +80,9 @@ spec:
5680
configMap:
5781
defaultMode: 438
5882
name: hello-world-configmap
83+
- name: tmp-volume
84+
emptyDir: {}
85+
- name: cache-volume
86+
emptyDir: {}
87+
- name: run-volume
88+
emptyDir: {}
File renamed without changes.

0 commit comments

Comments
 (0)