The convert_stig function crashes on Rules containing an array of ident values instead of single ident value.
Example STIG: U_AAA_Services_V1R2_SRG
See: 33rd Rule, title: SRG-APP-000516-AAA-000350
SRG-APP-000516-AAA-000350AAA Services must be configured to use at least two NTP servers to synchronize time.<VulnDiscussion>Inaccurate time stamps make it more difficult to correlate events and can lead to an inaccurate analysis. Determining the correct time a particular event occurred on a system is critical when conducting forensic analysis and investigating system events. Sources outside of the configured acceptable allowance (drift) may be inaccurate. Additionally, unnecessary synchronization may have an adverse impact on system performance and may indicate malicious activity.
If the internal clock is not used, the system may not be able to provide time stamps for log messages. Additionally, externally generated time stamps may not be accurate. Applications can use the capability of an operating system or purpose-built module for this purpose. Synchronizing the internal clock using NTP provides uniformity for all system clocks over a network. NTP provides an efficient and scalable method for network devices to synchronize to an accurate time source.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target SRG-APP-AAADISADPMS TargetSRG-APP-AAA3357CCI-000366CCI-001891Configure AAA Services to use two separate NTP servers. Both a primary and backup NTP server must be identified in the configuration.Verify AAA Services are configured to use at least two NTP servers to synchronize time. Both a primary and backup NTP server must be identified in the configuration. AAA Services may leverage the capability of an operating system.
If AAA Services are not configured to use at least two separate NTP servers, this is a finding.
The problematic code starts at line #113.
## HANDLE MULTIPLE IDENT ENTRIES (CCI)
if len(IDENT) == 2:
IDENT = IDENT['#text']
else:
## DEFINE EMPTY RESULTS
RESULTS = ""
## LOOP THROUGH ALL CCI NUMBERS
for RESULT in IDENT:
RESULTS += RESULT['#text'] + ","
## REMOVE LAST ','
IDENT = RESULTS.rstrip(RESULTS[-1])
Here is some output with some print statements added showing what happens:
The convert_stig function crashes on Rules containing an array of
ident
values instead of singleident
value.Example STIG: U_AAA_Services_V1R2_SRG See: 33rd Rule, title: SRG-APP-000516-AAA-000350
The problematic code starts at line #113.
Here is some output with some print statements added showing what happens: