GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(ci): validate embedded JSON blobs in ConfigMaps by devantler · Pull Request #2502 · devantler-tech/platform

Conversation

@devantler

@devantler devantler commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

🤖 Generated by the Daily AI Assistant

Why

ConfigMaps that embed whole JSON documents (the Headlamp Kubescape exceptions policy, velero's node-agent config) are opaque strings to schema validation — a stray comma ships silently and only breaks where the JSON is consumed, where an empty exceptions view reads identical to a clean posture. Flagged by CodeRabbit on #2446.

What

Adds a fast stdlib-Python CI gate that json-parses every registered embedded-JSON ConfigMap key (exceptionPolicies plus any *.json key) as the first step of the validate job, failing the PR on a syntax error. Verified against a deliberately corrupted blob in both covered ConfigMaps.

Fixes #2480

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
devantler and others added 2 commits July 5, 2026 16:04
@devantler @claude
feat(ci): validate embedded JSON blobs in ConfigMaps
c55b6b0
Registered ConfigMap data keys (exceptionPolicies, *.json) are now
json-parsed by scripts/validate-embedded-json.py as the first step of the
validate job, so a JSON syntax error fails the PR instead of shipping as an
opaque string that only breaks at consumption time.

Fixes #2480

Co-Authored-By: Claude Fable 5 <[email protected]>
@devantler @claude
chore(ci): drop executable bit to match validate-naming.py
d2bec9a
Co-Authored-By: Claude Fable 5 <[email protected]>
@devantler devantler added the enhancement label Jul 5, 2026
@github-project-automation github-project-automation Bot added this to 🌊 Project Board Jul 5, 2026
@github-project-automation github-project-automation Bot moved this to 🫴 Ready in 🌊 Project Board Jul 5, 2026
@coderabbitai

coderabbitai Bot commented Jul 5, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds scripts/validate-embedded-json.py, a stdlib Python script that scans k8s ConfigMap manifests for embedded JSON values (in registered keys or keys ending in .json), validates JSON syntax, and flags folded YAML scalars (>) as invalid for JSON content. The CI workflow (ci.yaml) is updated to include this script in its k8s path filter and to run it as a new step in the validate job before KSail setup. AGENTS.md documentation is updated to describe this new validation step.

Sequence Diagram(s)

Included above within the hidden review stack artifact.

Related issues: #2480

Suggested labels: ci, documentation, scripts

Suggested reviewers: devantler

Poem:
A rabbit hopped through YAML deep,
Found stray commas that JSON can't keep,
With scripts in hand and CI's new eye,
No folded scalar shall slip on by,
Now every blob it checks with glee — 🐰✅

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR adds a stdlib CI script, wires it into validate, checks registered JSON-like keys, and documents the flow, matching #2480.
Out of Scope Changes check ✅ Passed The changes are limited to the workflow, validation script, and related documentation, with no obvious unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly summarizes the main change: adding CI validation for embedded JSON in ConfigMaps.
Description check ✅ Passed The description matches the changeset and explains the CI gate, target keys, and motivation.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

coderabbitai[bot]
coderabbitai Bot approved these changes Jul 5, 2026
View reviewed changes
@devantler
devantler marked this pull request as ready for review July 5, 2026 16:08
@devantler
devantler added this pull request to the merge queue Jul 5, 2026
Merged via the queue into main with commit 40a7736 Jul 5, 2026
16 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@devantler
devantler deleted the claude/configmap-json-guard branch July 5, 2026 16:11
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Jul 5, 2026
@botantler-1

botantler-1 Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.105.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@botantler-1 botantler-1 Bot added the released label Jul 5, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jul 13, 2026
Migrate remaining Python tooling and tests to Go #2623
Closed
9 tasks
This was referenced Jul 28, 2026
fix(ci): verify the KSail archive before installing it in the validate job #2841
Closed
The homepage bookmark regression suite runs nowhere, so it silently stops being true #2909
Closed
fix(security): nothing catches a Flux verify block placed at a path KSail ignores #2920
Closed
@coderabbitai coderabbitai Bot mentioned this pull request Aug 6, 2026
Default-off Kustomize components are never validated by CI #2995
Closed
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

released

Projects

🌊 Project Board
Archived in project

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Validate embedded JSON blobs in ConfigMaps in CI

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@devantler
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.