Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

OSAC-1083: OSAC-1397: Add schema validation and fix subchart version pinning - #253

Merged
openshift-merge-bot[bot] merged 1 commit into
osac-project:mainfrom
eliorerz:fix/osac-1083-1397-chart-versions-and-schema
Jun 11, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
osac-project:mainfrom
eliorerz:fix/osac-1083-1397-chart-versions-and-schema

Conversation

@eliorerz

@eliorerz eliorerz commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Use version range ">=0.0.0" in Chart.yaml for file:// dependencies so submodule bumps don't break helm dependency build when subcharts change their version (fixes bump submodules #248)
  • Update publish workflow to read each subchart's actual version from its own Chart.yaml using yq instead of assuming a single version for all
  • Add required field validation in values.schema.json for service.auth.issuerUrl (URL pattern) and service.certs.issuerRef.name
  • Set issuerUrl default to https://REPLACE_ME placeholder so helm lint / ct lint passes with schema enforcement

Summary by CodeRabbit

  • Chores
    • Broadened Helm chart dependency version constraints for increased flexibility
    • Enhanced configuration requirements for service authentication and certificate management
    • Updated configuration schema with additional TLS and authentication setup options

@openshift-ci-robot

openshift-ci-robot commented Jun 10, 2026

Copy link
Copy Markdown

@eliorerz: This pull request references OSAC-1083 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Use version range ">=0.0.0" in Chart.yaml for file:// dependencies so submodule bumps don't break helm dependency build when subcharts change their version (fixes bump submodules #248)
  • Update publish workflow to read each subchart's actual version from its own Chart.yaml using yq instead of assuming a single version for all
  • Add required field validation in values.schema.json for service.auth.issuerUrl (URL pattern) and service.certs.issuerRef.name
  • Set issuerUrl default to https://REPLACE_ME placeholder so helm lint / ct lint passes with schema enforcement

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 6a8d12c7-2074-44d1-84be-2915b12b1cf5

📥 Commits

Reviewing files that changed from the base of the PR and between f678f7a and f38551f.

📒 Files selected for processing (3)
  • charts/osac/Chart.yaml
  • charts/osac/values.schema.json
  • charts/osac/values.yaml

Walkthrough

This PR enhances the OSAC Helm chart with flexible dependency versioning and strict service configuration schema validation. Dependency version constraints transition from fixed "0.0.0" to ranges, while new required service configuration fields enforce certificate issuer and authentication setup with structured validation patterns.

Changes

Helm Chart Configuration and Schema Updates

Layer / File(s) Summary
Helm Dependency Version Constraints
charts/osac/Chart.yaml
Dependency version constraints for osac-operator-crds, osac-operator, fulfillment-service, and osac-aap broaden from exact "0.0.0" pins to ">=0.0.0" ranges, permitting flexible subchart resolution.
Service Configuration Schema and Validation
charts/osac/values.schema.json, charts/osac/values.yaml
Service schema is enhanced to require auth (OIDC issuer URL with ^https?:// validation, optional controller credentials) and certs (required issuer name, optional CA bundle configMap) properties. Database connection configuration added as optional array. Placeholder issuer URL updated from empty string to "https://REPLACE_ME".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • osac-project/osac-installer#252: Rewrites chart publishing workflow to pin dependency versions from file:// to OCI URLs—directly adjacent to this PR's broadening of dependency version constraints.

  • osac-project/osac-installer#229: Adds chart CI linting scenario values that supply required service.auth/issuer fields—aligns with this PR's schema enforcement making service.auth and service.certs mandatory.

  • osac-project/osac-installer#263: Fixes dependency-version area by updating publish workflow to accept per-component versions and pin them—complementary to this PR's relaxed version constraints.

Suggested labels

lgtm

Suggested reviewers

  • rgolangh
  • omer-vishlitzky

⚙️ Chart constraints relax, schema tightens,
Flex on versions, structure enlightens! 📋
HTTPS placeholders wait for their home,
Helm dependencies roam where they roam. 🗺️

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning AI appears used (.ai-bot files added), but the commit lacks Assisted-by/Generated-by trailers (no Co-Authored-By). Medium compliance/audit risk. Add Red Hat-required Assisted-by or Generated-by trailers for the AI tool(s) to the commit/PR description; avoid Co-Authored-By for AI tools.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary changes: fixing subchart version pinning and adding schema validation for OSAC configuration.
Linked Issues check ✅ Passed The PR addresses the core objective from #248 by changing version constraints from fixed '0.0.0' to '>=0.0.0' to prevent helm dependency build failures when subcharts update versions.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the linked objectives: version pinning fixes, schema validation additions, and placeholder defaults for lint compliance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
No-Hardcoded-Secrets ✅ Passed Scanned PR-touched Helm files: no private keys/API-key/token/password values or URLs with embedded credentials; issuerUrl is set only to placeholder https://REPLACE_ME.
No-Weak-Crypto ✅ Passed No weak-crypto keywords (MD5/SHA1/RC4/DES/3DES/Blowfish/ECB) found in repo text; PR changes appear limited to Helm chart/schema/values, not crypto code.
No-Injection-Vectors ✅ Passed PR #253 only updates charts/osac/Chart.yaml and values schema/values; none of the flagged injection patterns (shell=True, eval/exec, pickle.loads, yaml.load, os.system, dangerouslySetInnerHTML, SQL...
Container-Privileges ✅ Passed PR #253 only updates Helm chart files (Chart.yaml, values.schema.json, values.yaml); no Kubernetes/container privilege settings (privileged, hostPID/hostNetwork/hostIPC, SYS_ADMIN, allowPrivilegeEs...
No-Sensitive-Data-In-Logs ✅ Passed PR #253 only updates Helm Chart.yaml and values schema/values; no application/workflow code changes adding log statements that could expose passwords/tokens/PII.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@eliorerz
eliorerz force-pushed the fix/osac-1083-1397-chart-versions-and-schema branch from d785caf to f1fe4b4 Compare June 10, 2026 18:51
@eliorerz
eliorerz force-pushed the fix/osac-1083-1397-chart-versions-and-schema branch from f1fe4b4 to 045af7a Compare June 10, 2026 18:55
@omer-vishlitzky

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@omer-vishlitzky

Copy link
Copy Markdown
Contributor

/retest

@eliorerz
eliorerz force-pushed the fix/osac-1083-1397-chart-versions-and-schema branch from 045af7a to f678f7a Compare June 11, 2026 14:14
@openshift-ci openshift-ci Bot removed the lgtm label Jun 11, 2026
@eliorerz
eliorerz force-pushed the fix/osac-1083-1397-chart-versions-and-schema branch from f678f7a to 270d404 Compare June 11, 2026 14:18

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/publish-charts.yaml:
- Around line 52-56: After extracting CRDS_VER, OPERATOR_VER, SERVICE_VER and
AAP_VER, validate each value against a strict semver regex (e.g.
^[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9.-]+)?$) and abort the workflow with a clear
error if any fail; alternatively replace the grep/awk extraction with yq-based
reads and then validate the results. Also change the subsequent yq usage that
interpolates these variables (the yq command around lines 61-70) to pass the
versions safely (e.g. via yq --arg or other safe parameter passing) rather than
directly expanding untrusted double-quoted variables, so malformed or malicious
version strings cannot break the command or inject shell code.

In `@charts/osac/Chart.yaml`:
- Line 9: The Chart.yaml currently sets the root chart and subcharts to an
overly permissive version range ">=0.0.0"; change the version constraints to a
tighter range (for example ">=0.0.0 <1.0.0") or add an explicit pinned version
for each affected chart entry instead of the unbounded ">=0.0.0" token, or
alternatively implement a CI validation that checks submodule Chart.yaml
versions against an allowlist; locate the version field that currently equals
">=0.0.0" in Chart.yaml (and the other occurrences noted) and update them to the
chosen bounded constraint or add the CI/check as appropriate.

In `@charts/osac/values.schema.json`:
- Around line 156-161: The JSON schema for issuerUrl currently allows http by
using the pattern "^https?://"; update the issuerUrl property in
values.schema.json to require HTTPS only (e.g., change the pattern to
"^https://") and ensure its description reflects HTTPS requirement; optionally
add a separate boolean flag (e.g., auth.allowInsecure with default false and
documentation/warnings) if you need to explicitly permit insecure HTTP for local
testing so production remains locked to HTTPS.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 2cb089fb-675c-494b-b2f7-3b26c95c6b2d

📥 Commits

Reviewing files that changed from the base of the PR and between 0aea7ed and f678f7a.

📒 Files selected for processing (13)
  • .github/workflows/publish-charts.yaml
  • base/kustomization.yaml
  • base/osac-aap
  • base/osac-fulfillment-service
  • base/osac-operator
  • charts/osac/Chart.yaml
  • charts/osac/values.schema.json
  • charts/osac/values.yaml
  • overlays/caas-ci/kustomization.yaml
  • overlays/osac-integration/kustomization.yaml
  • overlays/vmaas-ci/kustomization.yaml
  • values/caas-ci.yaml
  • values/vmaas-ci.yaml

Comment thread .github/workflows/publish-charts.yaml Outdated
Comment thread charts/osac/Chart.yaml
dependencies:
- name: osac-operator-crds
version: "0.0.0"
version: ">=0.0.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial | ⚖️ Poor tradeoff

Supply chain: Extremely permissive version constraint ">=0.0.0" accepts any subchart version.

The range constraint ">=0.0.0" removes all upper bounds, allowing helm dependency build to accept any version present in the submodule directories. While this prevents breakage when submodules bump their chart versions (per issue #248), it also means local builds have no version validation.

Risk impact: If a submodule's Chart.yaml version is unexpectedly modified (accidentally or maliciously), the build will silently succeed with the new version. The published chart workflow mitigates this by pinning exact versions (lines 61-70 of publish-charts.yaml), but local development and CI validation builds remain unconstrained.

Trade-off consideration: The current approach prioritizes build reliability over strict version control. If tighter supply chain guarantees are needed, consider either (a) adding version upper bounds (e.g., ">=0.0.0 <1.0.0"), or (b) adding a CI check that validates submodule chart versions against an allowlist.

Also applies to: 13-13, 17-17, 21-21

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/osac/Chart.yaml` at line 9, The Chart.yaml currently sets the root
chart and subcharts to an overly permissive version range ">=0.0.0"; change the
version constraints to a tighter range (for example ">=0.0.0 <1.0.0") or add an
explicit pinned version for each affected chart entry instead of the unbounded
">=0.0.0" token, or alternatively implement a CI validation that checks
submodule Chart.yaml versions against an allowlist; locate the version field
that currently equals ">=0.0.0" in Chart.yaml (and the other occurrences noted)
and update them to the chosen bounded constraint or add the CI/check as
appropriate.

Comment on lines +156 to +161
"issuerUrl": {
"type": "string",
"description": "OIDC issuer URL (e.g. Keycloak realm URL)",
"minLength": 1,
"pattern": "^https?://"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚖️ Poor tradeoff

Security risk: Pattern permits insecure HTTP for OIDC issuer URLs.

The regex pattern ^https?:// accepts both http:// and https:// schemes for the OIDC issuer URL. In production environments, authentication issuer URLs must use HTTPS to prevent credential interception and token leakage. Allowing http:// degrades the security posture and creates a path for misconfiguration that could expose authentication tokens in transit.

Impact: Administrators could inadvertently configure an HTTP issuer URL, exposing OIDC tokens and user credentials to network eavesdropping. This violates security best practices for identity providers.

Severity: Major – security posture gap that permits insecure configuration.

🔒 Recommended fix: Restrict pattern to HTTPS only
             "issuerUrl": {
               "type": "string",
               "description": "OIDC issuer URL (e.g. Keycloak realm URL)",
               "minLength": 1,
-              "pattern": "^https?://"
+              "pattern": "^https://"
             },

For local development or testing scenarios that genuinely require HTTP (e.g., kind clusters), consider adding a separate boolean flag like auth.allowInsecure: false (default false) that must be explicitly enabled, with clear warnings in documentation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/osac/values.schema.json` around lines 156 - 161, The JSON schema for
issuerUrl currently allows http by using the pattern "^https?://"; update the
issuerUrl property in values.schema.json to require HTTPS only (e.g., change the
pattern to "^https://") and ensure its description reflects HTTPS requirement;
optionally add a separate boolean flag (e.g., auth.allowInsecure with default
false and documentation/warnings) if you need to explicitly permit insecure HTTP
for local testing so production remains locked to HTTPS.

@omer-vishlitzky

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm label Jun 11, 2026
@openshift-ci

openshift-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown

@eliorerz: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-vmaas 270d404 link true /test e2e-vmaas

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@omer-vishlitzky

Copy link
Copy Markdown
Contributor

rebase

…pinning

- Chart.yaml: Use >=0.0.0 for subchart dependency versions so builds
  don't break when subcharts bump their version from 0.0.0.

- values.schema.json: Add required field validation for service.auth
  (issuerUrl with URL pattern) and service.certs (issuerRef.name),
  plus database connection schema.

- values.yaml: Change issuerUrl default from empty string to
  https://REPLACE_ME so schema validation passes and the placeholder
  is obvious.
@eliorerz
eliorerz force-pushed the fix/osac-1083-1397-chart-versions-and-schema branch from 270d404 to f38551f Compare June 11, 2026 19:24
@openshift-ci openshift-ci Bot removed the lgtm label Jun 11, 2026
@omer-vishlitzky

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm label Jun 11, 2026
@openshift-ci

openshift-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eliorerz, omer-vishlitzky

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [eliorerz,omer-vishlitzky]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit fdea72d into osac-project:main Jun 11, 2026
8 checks passed
@eliorerz
eliorerz deleted the fix/osac-1083-1397-chart-versions-and-schema branch June 15, 2026 12:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants