Skip to content

Update ID mappings to fix STIGViewer imports#20

Merged
egibs merged 13 commits intochainguard-dev:mainfrom
egibs:update-ids
Jul 21, 2025
Merged

Update ID mappings to fix STIGViewer imports#20
egibs merged 13 commits intochainguard-dev:mainfrom
egibs:update-ids

Conversation

@egibs
Copy link
Copy Markdown
Member

@egibs egibs commented Jul 16, 2025

This PR updates our GPOS STIG and Benchmark IDs to allow for the following STIGViewer workflow:

  • File -> Import STIG
  • Select ssg-chainguard-gpos-ds.xml (or import U_GPOS_V3R2_SRG.zip directly)
  • Checklist -> Create Checklist - Check Marked STIG(s)
  • Import XCCDF Results File -> results.xml

For the most part, this follows existing STIG patterns and seems to work without issue (plus the original results.html file still displays as it always did).

image

Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
@egibs egibs requested a review from stevebeattie July 16, 2025 21:50
Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml Outdated
Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml Outdated
egibs added 3 commits July 16, 2025 18:00
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
@egibs
Copy link
Copy Markdown
Member Author

egibs commented Jul 17, 2025

Fixed the validation for the files in 53b2559 and 1a6dbad:

$ docker run -i --rm -u 0:0 --pid=host -v /var/run/docker.sock:/var/run/docker.sock   -v $(pwd)/out:/out -v $(pwd):/workspace cgr.dev/chainguard/openscap:latest-dev ds sds-validate /workspace/gpos/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml
$
$ $ docker run -i --rm -u 0:0 --pid=host -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd)/out:/out -v $(pwd):/workspace cgr.dev/chainguard/openscap:latest-dev xccdf validate /workspace/gpos/xml/scap/ssg/content/ssg-chainguard-xccdf/OvalChecks/XccdfOvalChecks.xml
<?xml version="1.0"?>
Warning: The 'cpe:/' prefix (CPE URI binding) is allowed within an @idref attribute, but the CPE Formatted String binding is preferred. See the XCCDF 1.2.1 specification, Section 6.2.5.

@egibs egibs requested a review from stevebeattie July 17, 2025 00:12
Copy link
Copy Markdown
Member

@stevebeattie stevebeattie left a comment

Choose a reason for hiding this comment

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

Ugh, github won't let me comment inline on the unified diff of all commits, so I'm having to add comments on the individual commits, sorry about that. We're getting better, but there are still some issues.

Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml Outdated
Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml Outdated
Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml Outdated
Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml Outdated
Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml Outdated
Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml Outdated
Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml Outdated
Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-xccdf/OvalChecks/XccdfOvalChecks.xml Outdated
Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-xccdf/OvalChecks/XccdfOvalChecks.xml Outdated
egibs added 2 commits July 17, 2025 08:08
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
@egibs egibs requested a review from stevebeattie July 18, 2025 12:29
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
@egibs
Copy link
Copy Markdown
Member Author

egibs commented Jul 18, 2025

I can import the results cleanly against both STIGs with the latest changes. The upstream STIG contains more detail, but since the results work with either it's trivial to swap between them.

Using CATI as an example --
Our STIG:
CleanShot 2025-07-18 at 10 15 52@2x

Upstream (straing from the .zip archive):
CleanShot 2025-07-18 at 10 16 39@2x

Copy link
Copy Markdown
Member

@stevebeattie stevebeattie left a comment

Choose a reason for hiding this comment

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

One more thing to note is that, with the rule id changes in place, we'll have some tests in a couple of packages to update; https://github.com/wolfi-dev/os/blob/main/chainguard-security-guide.yaml being one of them.

Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml Outdated
Comment thread gpos/xml/scap/ssg/content/ssg-chainguard-gpos-ds.xml Outdated
egibs added 2 commits July 21, 2025 05:25
Signed-off-by: Evan Gibler <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
@egibs egibs requested a review from stevebeattie July 21, 2025 18:55
egibs added 4 commits July 21, 2025 14:08
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
…F formatting

Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Copy link
Copy Markdown
Member

@stevebeattie stevebeattie left a comment

Choose a reason for hiding this comment

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

Verified that I can use oscap/oscap-docker to generate results, that the html report looks sensible in both success and failure conditions, that the results files can be imported into a stig checklist with both stig viewer v2 (when applied to both the disa xccdf and our xccdf) and v3.

Thanks for all your efforts!

@egibs egibs merged commit 753e12a into chainguard-dev:main Jul 21, 2025
2 checks passed
@brooksphilip
Copy link
Copy Markdown

Can we add one more change to output the test run, the result, and the pass/fail to the finding details box?

@egibs
Copy link
Copy Markdown
Member Author

egibs commented Jul 23, 2025

Can we add one more change to output the test run, the result, and the pass/fail to the finding details box?

Would that be here?
CleanShot 2025-07-23 at 09 37 25@2x

@egibs egibs deleted the update-ids branch April 17, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants