Skip to content

Commit 98a10d6

Browse files
authored
Merge pull request #2264 from Mab879/fix_2261_main
Add new STIG URL - 1.4
2 parents cc40a14 + 34d6947 commit 98a10d6

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/XCCDF/result.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@
9191

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

9697
// constants
9798
static const xccdf_numeric XCCDF_SCORE_MAX_DAFAULT = 100.0f;
@@ -1278,7 +1279,8 @@ void xccdf_result_to_dom(struct xccdf_result *result, xmlNode *result_node, xmlD
12781279
struct oscap_reference *ref = oscap_reference_iterator_next(references);
12791280
const char *href = oscap_reference_get_href(ref);
12801281
if (href && (strcmp(href, DISA_STIG_VIEWER_HREF[0]) == 0 ||
1281-
strcmp(href, DISA_STIG_VIEWER_HREF[1]) == 0)) {
1282+
strcmp(href, DISA_STIG_VIEWER_HREF[1]) == 0 ||
1283+
strcmp(href, DISA_STIG_VIEWER_HREF[2]) == 0)) {
12821284
const char *stig_rule_id = oscap_reference_get_title(ref);
12831285

12841286
xccdf_test_result_type_t other_res = (xccdf_test_result_type_t)oscap_htable_detach(nodes_by_rule_id, stig_rule_id);
@@ -1487,7 +1489,8 @@ void xccdf_rule_result_to_dom(struct xccdf_rule_result *result, xmlDoc *doc, xml
14871489
struct oscap_reference *ref = oscap_reference_iterator_next(references);
14881490
const char *href = oscap_reference_get_href(ref);
14891491
if (href && (strcmp(href, DISA_STIG_VIEWER_HREF[0]) == 0 ||
1490-
strcmp(href, DISA_STIG_VIEWER_HREF[1]) == 0)) {
1492+
strcmp(href, DISA_STIG_VIEWER_HREF[1]) == 0 ||
1493+
strcmp(href, DISA_STIG_VIEWER_HREF[2]) == 0)) {
14911494
const char *stig_rule_id = oscap_reference_get_title(ref);
14921495

14931496
xccdf_test_result_type_t expected_res = (xccdf_test_result_type_t)oscap_htable_get(nodes_by_rule_id, stig_rule_id);

xsl/xccdf-references.xsl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ Authors:
8282
<xsl:when test="starts-with($href, 'https://www.iso.org/standard/54534.html')">
8383
<xsl:text>ISO 27001-2013</xsl:text>
8484
</xsl:when>
85-
<xsl:when test="starts-with($href, 'https://iase.disa.mil/stigs/pages/stig-viewing-guidance')">
85+
<xsl:when test="starts-with($href, 'https://iase.disa.mil/stigs/pages/stig-viewing-guidance') or
86+
starts-with($href, 'https://public.cyber.mil/stigs/srg-stig-tools/') or
87+
starts-with($href, 'https://www.cyber.mil/stigs/srg-stig-tools/')">
8688
<xsl:text>STIG Viewer</xsl:text>
8789
</xsl:when>
8890
<xsl:otherwise>

0 commit comments

Comments
 (0)