Skip to content

Commit b641536

Browse files
authored
Merge pull request #1404 from abergmann/stig-viewer-uri-changes-maint-1.2
Add new STIG Viewer URI public.cyber.mil and be backward compatible in maint-1.2
2 parents f7d9c88 + 7055435 commit b641536

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/XCCDF/result.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
#include "source/oscap_source_priv.h"
4848

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

5253
// constants
5354
static const xccdf_numeric XCCDF_SCORE_MAX_DAFAULT = 100.0f;
@@ -1096,7 +1097,8 @@ xmlNode *xccdf_rule_result_to_dom(struct xccdf_rule_result *result, xmlDoc *doc,
10961097
struct oscap_reference_iterator *references = xccdf_item_get_references(XRULE(item));
10971098
while (oscap_reference_iterator_has_more(references)) {
10981099
struct oscap_reference *ref = oscap_reference_iterator_next(references);
1099-
if (strcmp(oscap_reference_get_href(ref), DISA_STIG_VIEWER_HREF) == 0) {
1100+
if (strcmp(oscap_reference_get_href(ref), DISA_STIG_VIEWER_HREF[0]) == 0 ||
1101+
strcmp(oscap_reference_get_href(ref), DISA_STIG_VIEWER_HREF[1]) == 0) {
11001102
stig_rule_id = oscap_reference_get_title(ref);
11011103
break;
11021104
}

0 commit comments

Comments
 (0)