test: add OPA provider to cross-repo integration tests#586
Conversation
There was a problem hiding this comment.
Trivy found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
cb4f044 to
1221a94
Compare
Trivy FindingsThe 30 Trivy annotations are expected — they flag the K8s Deployment test fixtures (
These are test fixtures, not deployed infrastructure. The devcontainer's |
1221a94 to
d718b28
Compare
gxmiranda
left a comment
There was a problem hiding this comment.
PR Review: #586 — test: add OPA provider to cross-repo integration tests
Verdict: COMMENT (no blocking findings)
Clean, well-structured test-only PR. Code follows existing patterns, CI is green, scope is tight, and test coverage is thorough (positive and negative cases for get/generate/scan stages). The .trivyignore is well-scoped with clear rationale comments.
Finding
[MEDIUM] Missing Signed-off-by trailer — Commit d718b28 does not include a Signed-off-by trailer. Constitution "Commit Trailers" section: "All commits MUST include a Signed-off-by trailer." Fix with git commit --amend -s and force-push.
This review was generated by /review-pr (AI-assisted).
d718b28 to
f311157
Compare
Add end-to-end OPA provider validation to the cross-repo integration test pipeline. The tests exercise the full complyctl + OPA provider workflow using the existing mock registry test data (K8s container security policies). Changes: - Add conftest install step to CI workflow - Add OPA provider binary prerequisite check and install - Add K8s Deployment test fixtures (non-compliant and compliant) - Add test_get_opa: verifies OPA policy + complypack pulled - Add test_generate_opa: verifies generate with OPA provider - Add test_scan_opa: scans non-compliant fixture, asserts failures - Add test_scan_opa_compliant: scans compliant fixture, asserts pass - Rename test-opa-bp to test-opa-k8s (not branch protection) Ref: complytime/complytime-providers#73 Signed-off-by: George Vauter <gvauter@redhat.com>
f311157 to
9abb608
Compare
|
Thanks for the review @gxmiranda. |
Summary
Add end-to-end OPA provider validation to the cross-repo integration test pipeline. The tests exercise the full
complyctl+complyctl-provider-opaworkflow using the existing mock registry test data (K8s container security policies).Changes
conftest@v0.68.2install step (OPA provider runtime dependency)test_get_opa— verifies OPA policy + complypack pulled from mock registrytest_generate_opa— verifies generate succeeds with OPA providertest_scan_opa— scans non-compliant K8s fixture, asserts failures with correct requirement IDstest_scan_opa_compliant— swaps in compliant K8s fixture, asserts all passtest-deployment-bad.yaml(fails both Rego policies) andtest-deployment-good.yaml(passes both)test-opa-bp→test-opa-k8s(these policies check K8s container security, not branch protection)TESTING_ENVIRONMENT.mdpolicy ID referencesWhat it tests
The full pipeline end-to-end with real binaries:
complyctl getpulls OPA Gemara policy + complypack from mock OCI registrycomplyctl generateresolves policy graph, passes complypack content path to OPA provider via gRPCcomplytime-mapping.json, matches requirement IDs to Rego namespacescomplyctl scantriggersconftest testagainst K8s Deployment YAML with real Rego policiesCompanion PR
A companion change to install conftest in the complytime-providers cross-repo CI workflow will be opened separately against
complytime/complytime-providers.Ref: complytime/complytime-providers#73