system.scap
Description
Provides methods to schedule SCAP scans and access the results.
Namespace:
system.scap
Method: deleteXccdfScan
HTTP POST
Description:
Delete OpenSCAP XCCDF Scan from the Uyuni database. Note that only those SCAP Scans can be deleted which have passed their retention period.
Parameters:
-
string sessionKey
-
int xid - ID of XCCDF scan.
Returns:
-
boolean status - indicates success of the operation
Method: getXccdfScanDetails
HTTP GET
Description:
Get details of given OpenSCAP XCCDF scan.
Parameters:
-
string sessionKey
-
int xid - ID of XCCDF scan.
Returns:
-
* struct OpenSCAP XCCDF Scan
-
int "xid" - XCCDF TestResult ID
-
int "sid" - serverId
-
int "action_id" - ID of the parent action
-
string "path" - path to XCCDF document
-
string "ovalfiles" - optional OVAL files
-
string "oscap_parameters" - oscap command-line arguments
-
string "test_result" - identifier of XCCDF TestResult
-
string "benchmark" - identifier of XCCDF Benchmark
-
string "benchmark_version" - version of the Benchmark
-
string "profile" - identifier of XCCDF Profile
-
string "profile_title" - title of XCCDF Profile
-
dateTime.iso8601 "start_time" - client machine time of scan start
-
dateTime.iso8601 "end_time" - client machine time of scan completion
-
string "errors" - stderr output of scan
-
boolean "deletable" - indicates whether the scan can be deleted
-
Method: getXccdfScanRuleResults
HTTP GET
Description:
Return a full list of RuleResults for given OpenSCAP XCCDF scan.
Parameters:
-
string sessionKey
-
int xid - ID of XCCDF scan.
Returns:
-
array :
-
struct OpenSCAP XCCDF RuleResult
-
string "idref" - idref from XCCDF document
-
string "result" - result of evaluation
-
string "idents" - comma separated list of XCCDF idents
-
Method: listPolicies
HTTP GET
Description:
List SCAP policies available for the user’s organization.
Parameters:
-
string sessionKey
Returns:
-
array :
-
struct SCAP policy information
-
int "id" - Policy ID
-
string "policyName" - Policy name
-
string "description" - Policy description
-
int "scapContentId" - SCAP content ID
-
string "xccdfProfileId" - XCCDF profile ID
-
int "tailoringFileId" - Tailoring file ID (optional)
-
string "tailoringProfileId" - Tailoring profile ID (optional)
-
string "ovalFiles" - OVAL files
-
string "advancedArgs" - Advanced arguments
-
boolean "fetchRemoteResources" - Fetch remote resources flag
-
Method: listScapContent
HTTP GET
Description:
List all available SCAP content.
Parameters:
-
string sessionKey
Returns:
-
array :
-
struct SCAP content information
-
int "id" - SCAP content ID
-
string "name" - SCAP content name
-
string "description" - SCAP content description
-
string "dataStreamFileName" - DataStream file name
-
string "xccdfFileName" - XCCDF file name
-
Method: listTailoringFiles
HTTP GET
Description:
List tailoring files available for the user’s organization.
Parameters:
-
string sessionKey
Returns:
-
array :
-
struct Tailoring file information
-
int "id" - Tailoring file ID
-
string "name" - Tailoring file name
-
string "fileName" - File name on disk
-
int "orgId" - Organization ID
-
Method: listXccdfScans
HTTP GET
Description:
Return a list of finished OpenSCAP scans for a given system.
Parameters:
-
string sessionKey
-
int sid
Returns:
-
array :
-
struct OpenSCAP XCCDF Scan
-
int "xid" - XCCDF TestResult ID
-
string "profile" - XCCDF Profile
-
string "path" - path to XCCDF document
-
string "ovalfiles" - optional OVAL files
-
dateTime.iso8601 "completed" - scan completion time
-
Method: scheduleXccdfScanCustom
HTTP POST
Description:
Schedule SCAP scan with custom parameters.
Parameters:
-
string sessionKey
-
int array sids
-
struct params
-
int "scapContentId" - SCAP content ID (required)
-
string "xccdfProfileId" - XCCDF profile ID (required)
-
int "tailoringFileId" - Tailoring file ID (optional)
-
string "tailoringProfileId" - Tailoring profile ID (optional)
-
string "ovalFiles" - OVAL files (optional)
-
string "advancedArgs" - Advanced arguments for the oscap tool (optional). Only the options selecting the rules to evaluate and the content to use are passed on: --rule, --skip-rule, --reference, --cpe, --local-files, --datastream-id, --xccdf-id, --benchmark-id, --tailoring-id, --fetch-remote-resources and --remediate. The paths given to --cpe and --local-files are read on the scanned system: only the XCCDF content and the tailoring file are transferred from the server. Other options are ignored; result and report options are set by the scan itself.
-
boolean "fetchRemoteResources" - Fetch remote resources (optional, default false)
-
-
dateTime.iso8601 date - The date to schedule the action
Returns:
-
int id - ID of SCAP action created
Method: scheduleXccdfScanCustom
HTTP POST
Description:
Schedule SCAP scan with custom parameters and an action description.
Parameters:
-
string sessionKey
-
int array sids
-
struct params
-
int "scapContentId" - SCAP content ID (required)
-
string "xccdfProfileId" - XCCDF profile ID (required)
-
int "tailoringFileId" - Tailoring file ID (optional)
-
string "tailoringProfileId" - Tailoring profile ID (optional)
-
string "ovalFiles" - OVAL files (optional)
-
string "advancedArgs" - Advanced arguments (optional)
-
boolean "fetchRemoteResources" - Fetch remote resources (optional, default false)
-
-
dateTime.iso8601 date - The date to schedule the action
-
string actionDescription - Comment / action description
Returns:
-
int id - ID of SCAP action created
Method: scheduleXccdfScanWithPolicy
HTTP POST
Description:
Schedule SCAP scan based on an existing SCAP policy.
Parameters:
-
string sessionKey
-
int array sids
-
int policyId - SCAP policy ID
-
dateTime.iso8601 date - The date to schedule the action
Returns:
-
int id - ID of SCAP action created
Method: scheduleXccdfScanWithPolicy
HTTP POST
Description:
Schedule SCAP scan based on an existing SCAP policy with an action description.
Parameters:
-
string sessionKey
-
int array sids
-
int policyId - SCAP policy ID
-
dateTime.iso8601 date - The date to schedule the action
-
string actionDescription - Comment / action description
Returns:
-
int id - ID of SCAP action created