Skip to content

chore(fix): Resolve Snyk IaC Findings for RHDH Helm Chart (with and without Orchestrator)#166

Merged
rm3l merged 18 commits intoredhat-developer:mainfrom
Fortune-Ndlovu:address-snyk-findings
Jun 20, 2025
Merged

chore(fix): Resolve Snyk IaC Findings for RHDH Helm Chart (with and without Orchestrator)#166
rm3l merged 18 commits intoredhat-developer:mainfrom
Fortune-Ndlovu:address-snyk-findings

Conversation

@Fortune-Ndlovu
Copy link
Copy Markdown
Member

@Fortune-Ndlovu Fortune-Ndlovu commented Jun 4, 2025

Description of the change

This PR addresses all reported Snyk Infrastructure-as-Code (IaC) findings for the RHDH Helm Chart in both configurations:

Validation

  • snyk iac test shows 0 issues for both:
    • output/backstage
    • output/backstage-orchestrator
  • Helm chart renders and deploys successfully in both configurations

Existing or Associated Issue(s)

https://issues.redhat.com/browse/RHIDP-7490

Additional Information

Checklist

  • Chart version bumped in Chart.yaml according to semver.
  • Variables are documented in the values.yaml and added to the README.md. The pre-commit utility can be used to generate the necessary content. Use pre-commit run -a to apply changes.
  • JSON Schema template updated and re-generated the raw schema via pre-commit hook.
  • List tests pass for Chart using the Chart Testing tool and the ct lint command.

Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
@openshift-ci openshift-ci Bot requested review from davidfestal and kadel June 4, 2025 12:35
@Fortune-Ndlovu Fortune-Ndlovu changed the title chore: Resolve SNYK-CC-K8S-6, SNYK-CC-K8S-9, SNYK-CC-K8S-10 chore: address-snyk-findings Jun 4, 2025
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
@Fortune-Ndlovu Fortune-Ndlovu changed the title chore: address-snyk-findings WIP chore: address-snyk-findings Jun 5, 2025
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
@Fortune-Ndlovu Fortune-Ndlovu changed the title WIP chore: address-snyk-findings chore(fix): Resolve Snyk IaC Findings for RHDH Helm Chart (with and without Orchestrator) Jun 5, 2025
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
@Fortune-Ndlovu
Copy link
Copy Markdown
Member Author

/cc @rm3l

@openshift-ci openshift-ci Bot requested a review from rm3l June 5, 2025 17:49
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Copy link
Copy Markdown
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Fortune-Ndlovu Could you look into the CI failures reported? It looks like the DB container might fail to start: https://github.com/redhat-developer/rhdh-chart/actions/runs/15486926807/job/43603618835?pr=166#step:13:4901
Thanks.

Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
@Fortune-Ndlovu
Copy link
Copy Markdown
Member Author

@rm3l, the root cause was that we had enabled readOnlyRootFilesystem: true for the Bitnami PostgreSQL container to satisfy Snyk IaC best practices. However, the PostgreSQL image requires write access to internal paths like /var/lib/pgsql/passwd during startup.

This resulted in a CrashLoopBackOff and prevented Backstage from connecting to the DB, which in turn caused multiple plugins (like healthcheck) to fail initialization.

I have removed the readOnlyRootFilesystem setting specifically for PostgreSQL to allow it to boot successfully, while retaining it for the rest of the containers where it's safe and beneficial.

Comment thread charts/backstage/values.yaml Outdated
Comment thread charts/backstage/templates/sonataflows.yaml Outdated
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Comment thread charts/backstage/values.yaml
… pod and does not allow hardcoding UIDs by default.

Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
…ing.

Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Comment thread charts/backstage/values.yaml
Comment thread charts/backstage/values.yaml
Comment thread charts/backstage/values.yaml
Comment thread charts/backstage/values.yaml Outdated
Comment thread charts/backstage/templates/sonataflows.yaml
Comment thread charts/backstage/templates/sonataflows.yaml
Comment thread charts/backstage/templates/tests/test-connection.yaml Outdated
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
@sonarqubecloud
Copy link
Copy Markdown

@Fortune-Ndlovu Fortune-Ndlovu requested a review from rm3l June 19, 2025 14:25
Copy link
Copy Markdown
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Jun 20, 2025
@rm3l rm3l merged commit 229e4f9 into redhat-developer:main Jun 20, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants