Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/XCCDF/result.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@

// References containing STIG Rule IDs can be found by their href attribute, it must match the following url
static const char *DISA_STIG_VIEWER_HREF[] = { "http://iase.disa.mil/stigs/Pages/stig-viewing-guidance.aspx",
"https://public.cyber.mil/stigs/srg-stig-tools/" };
"https://public.cyber.mil/stigs/srg-stig-tools/",
"https://www.cyber.mil/stigs/srg-stig-tools/" };

// constants
static const xccdf_numeric XCCDF_SCORE_MAX_DAFAULT = 100.0f;
Expand Down Expand Up @@ -1278,7 +1279,8 @@ void xccdf_result_to_dom(struct xccdf_result *result, xmlNode *result_node, xmlD
struct oscap_reference *ref = oscap_reference_iterator_next(references);
const char *href = oscap_reference_get_href(ref);
if (href && (strcmp(href, DISA_STIG_VIEWER_HREF[0]) == 0 ||
strcmp(href, DISA_STIG_VIEWER_HREF[1]) == 0)) {
strcmp(href, DISA_STIG_VIEWER_HREF[1]) == 0 ||
strcmp(href, DISA_STIG_VIEWER_HREF[2]) == 0)) {
const char *stig_rule_id = oscap_reference_get_title(ref);

xccdf_test_result_type_t other_res = (xccdf_test_result_type_t)oscap_htable_detach(nodes_by_rule_id, stig_rule_id);
Expand Down Expand Up @@ -1487,7 +1489,8 @@ void xccdf_rule_result_to_dom(struct xccdf_rule_result *result, xmlDoc *doc, xml
struct oscap_reference *ref = oscap_reference_iterator_next(references);
const char *href = oscap_reference_get_href(ref);
if (href && (strcmp(href, DISA_STIG_VIEWER_HREF[0]) == 0 ||
strcmp(href, DISA_STIG_VIEWER_HREF[1]) == 0)) {
strcmp(href, DISA_STIG_VIEWER_HREF[1]) == 0 ||
strcmp(href, DISA_STIG_VIEWER_HREF[2]) == 0)) {
const char *stig_rule_id = oscap_reference_get_title(ref);

xccdf_test_result_type_t expected_res = (xccdf_test_result_type_t)oscap_htable_get(nodes_by_rule_id, stig_rule_id);
Expand Down
4 changes: 3 additions & 1 deletion xsl/xccdf-references.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ Authors:
<xsl:when test="starts-with($href, 'https://www.iso.org/standard/54534.html')">
<xsl:text>ISO 27001-2013</xsl:text>
</xsl:when>
<xsl:when test="starts-with($href, 'https://iase.disa.mil/stigs/pages/stig-viewing-guidance')">
<xsl:when test="starts-with($href, 'https://iase.disa.mil/stigs/pages/stig-viewing-guidance') or
starts-with($href, 'https://public.cyber.mil/stigs/srg-stig-tools/') or
starts-with($href, 'https://www.cyber.mil/stigs/srg-stig-tools/')">
<xsl:text>STIG Viewer</xsl:text>
</xsl:when>
<xsl:otherwise>
Expand Down
Loading