feat: extend engine to support live ConfigMap validation (#10) - #69
Open
vedant-kawale-27 wants to merge 1 commit into
Open
feat: extend engine to support live ConfigMap validation (#10)#69vedant-kawale-27 wants to merge 1 commit into
vedant-kawale-27 wants to merge 1 commit into
Conversation
vedant-kawale-27
force-pushed
the
feature/configmap-validation
branch
from
July 2, 2026 18:42
73a8764 to
680784d
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends Kuberef’s recursive reference discovery and live cluster validation to include Kubernetes ConfigMap references (in addition to the existing Secret validation), and updates CLI + CI/SARIF outputs to differentiate resource types.
Changes:
- Added recursive extraction of ConfigMap references from Pod specs (
configMapKeyRefandconfigMapRefpatterns). - Added live ConfigMap existence + key validation via
read_namespaced_config_map, and introduced aTypecolumn in the Rich output table. - Updated GitHub annotations/SARIF generation for new ConfigMap-related rules, and added unit/integration tests plus a local test manifest.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
src/kuberef/main.py |
Adds ConfigMap reference extraction and integrates ConfigMap validation into the audit loop; updates CLI table columns. |
src/kuberef/formatters.py |
Adds GitHub annotation + SARIF messaging/rules for missing ConfigMaps and missing ConfigMap keys. |
tests/test_parser.py |
Adds unit test for ConfigMap reference extraction and an integration-style CLI test with mocked K8s API. |
test-manifests/configmap-test.yaml |
Adds a local manual verification manifest covering pass/warn/fail ConfigMap cases. |
mock-k8s/mock_k8s_server.py |
Introduces a simple mock Kubernetes API server for local/manual testing of secrets/configmaps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vedant-kawale-27
force-pushed
the
feature/configmap-validation
branch
2 times, most recently
from
July 2, 2026 18:53
36994f5 to
922eb34
Compare
Signed-off-by: vedant-kawale-27 <vedantkawale0304@gmail.com>
vedant-kawale-27
force-pushed
the
feature/configmap-validation
branch
from
July 2, 2026 18:58
922eb34 to
fb000f9
Compare
Contributor
Author
|
hee @hudazaan please merge it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
### Description
This PR extends the recursive discovery engine to support live ConfigMap validation, mirroring the existing Kubernetes Secret reference validation.
Specifically, it:
valueFrom.configMapKeyRef.nameandenvFrom[*].configMapRef.namein Pod templates.read_namespaced_config_map.Typecolumn to the terminal output table to clearly differentiate betweenSECRETandCONFIGMAPvalidation rows.missing-configmap,missing-configmap-key).Closes #10
Pull Request Checklist
.envvaluespoetry run pytestgit commit -s