CPLYTM-550 - Clean-up openscap-plugin configuration file#52
Merged
marcusburghardt merged 2 commits intoFeb 20, 2025
Merged
Conversation
gvauter
approved these changes
Feb 19, 2025
| expectedPolicyPath := filepath.Join(tempDir, "workspace", "plugins", "policy", "policy.yaml") | ||
| expectedResultsPath := filepath.Join(tempDir, "workspace", "plugins", "results", "results.xml") | ||
| expectedARFPath := filepath.Join(tempDir, "workspace", "plugins", "results", "arf.xml") | ||
| expectedPolicyPath := filepath.Join(tempDir, "workspace", "openscap", "policy", "policy.yaml") |
Member
There was a problem hiding this comment.
Tiny nit pick - perhaps use the PluginDir constant instead of "openscap" here? Just in case it were to ever change there would be less places to refactor.
Member
Author
There was a problem hiding this comment.
Good point @gvauter . I am preparing another PR on top of it and will already include this improvement. Thanks.
It was only used in a very initial stage. Now the plugin is managed by ComplyTime. Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
The plugin dir doesn't need to be changed. If there is any valid case for this in the future, we can introduce options on demand. For now, it is removed in favor of simplicity. Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
1162538 to
a0b2187
Compare
hbraswelrh
added a commit
to hbraswelrh/complyctl
that referenced
this pull request
Jun 4, 2026
Replace the dummy ampel complypack payload in the mock OCI registry with valid granular policy JSON that the ampel provider's LoadGranularPolicies() accepts. The dummy content lacked the required 'id' field, causing cross-repo integration test failures when the ampel provider consumes ComplypackContentPath (complytime-providers PR complytime#52). Changes: - Add testdata/ampel-complypack/block-force-push.json with valid AmpelPolicy content (copied from cross-repo test fixture) - Add //go:embed directive for ampel complypack testdata - Update seedDefaults() to use buildTarGzFromFS instead of buildDummyTarGz for the complypacks/ampel-bp artifact - Add TestBuildTarGzFromFS_AmpelFS verifying archive structure and JSON content validity - Extend TestSeedDefaults_AllReposSeeded with ampel complypack content blob verification (manifest -> layer -> gzip -> tar -> JSON -> id field) Follows the OPA complypack pattern established in commit 74fbae8. Ref: complytime/complytime-providers#52
hbraswelrh
added a commit
to hbraswelrh/complyctl
that referenced
this pull request
Jun 5, 2026
Replace the dummy ampel complypack payload in the mock OCI registry with valid granular policy JSON that the ampel provider's LoadGranularPolicies() accepts. The dummy content lacked the required 'id' field, causing cross-repo integration test failures when the ampel provider consumes ComplypackContentPath (complytime-providers PR complytime#52). Changes: - Add testdata/ampel-complypack/block-force-push.json with valid AmpelPolicy content (copied from cross-repo test fixture) - Add //go:embed directive for ampel complypack testdata - Update seedDefaults() to use buildTarGzFromFS instead of buildDummyTarGz for the complypacks/ampel-bp artifact - Add TestBuildTarGzFromFS_AmpelFS verifying archive structure and JSON content validity - Extend TestSeedDefaults_AllReposSeeded with ampel complypack content blob verification (manifest -> layer -> gzip -> tar -> JSON -> id field) Follows the OPA complypack pattern established in commit 74fbae8. Ref: complytime/complytime-providers#52
hbraswelrh
added a commit
to hbraswelrh/complyctl
that referenced
this pull request
Jun 5, 2026
Replace the dummy ampel complypack payload in the mock OCI registry with valid granular policy JSON that the ampel provider's LoadGranularPolicies() accepts. The dummy content lacked the required 'id' field, causing cross-repo integration test failures when the ampel provider consumes ComplypackContentPath (complytime-providers PR complytime#52). Changes: - Add testdata/ampel-complypack/block-force-push.json with valid AmpelPolicy content (copied from cross-repo test fixture) - Add //go:embed directive for ampel complypack testdata - Update seedDefaults() to use buildTarGzFromFS instead of buildDummyTarGz for the complypacks/ampel-bp artifact - Add TestBuildTarGzFromFS_AmpelFS verifying archive structure and JSON content validity - Extend TestSeedDefaults_AllReposSeeded with ampel complypack content blob verification (manifest -> layer -> gzip -> tar -> JSON -> id field) Follows the OPA complypack pattern established in commit 74fbae8. Ref: complytime/complytime-providers#52
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.
Summary
Serverstruct was only used in a very initial stage. Now the plugin is managed by ComplyTime.Related Issues
Review Hints
No impact is expected on how the plugin and commands behave, so unit tests should be enough.