Skip to content

Commit 283357b

Browse files
committed
Add new STIG URL
Fixes #2261
1 parent 4ceb7e9 commit 283357b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
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);

0 commit comments

Comments
 (0)