#include "xccdf_policy.h"
#include "oscap_download_cb.h"
Go to the source code of this file.
Enumerations | |
enum | xccdf_session_loading_flags_t { XCCDF_SESSION_LOAD_NONE = 0, XCCDF_SESSION_LOAD_XCCDF = 1 << 0, XCCDF_SESSION_LOAD_CPE = 1 << 1, XCCDF_SESSION_LOAD_OVAL = 1 << 2, XCCDF_SESSION_LOAD_CHECK_ENGINE_PLUGINS = 1 << 3, XCCDF_SESSION_LOAD_ALL = XCCDF_SESSION_LOAD_XCCDF | XCCDF_SESSION_LOAD_CPE | XCCDF_SESSION_LOAD_OVAL | XCCDF_SESSION_LOAD_CHECK_ENGINE_PLUGINS } |
Loading flags for XCCDF session xccdf_session The flags set which components will be loaded in XCCDF session. | |
Functions | |
struct xccdf_session * | xccdf_session_new (const char *filename) |
Costructor of xccdf_session. | |
struct xccdf_session * | xccdf_session_new_from_source (struct oscap_source *source) |
Costructor of xccdf_session. | |
void | xccdf_session_free (struct xccdf_session *session) |
Destructor of xccdf_session. | |
const char * | xccdf_session_get_filename (const struct xccdf_session *session) |
Retrieves the filename the session was created with xccdf_session. | |
bool | xccdf_session_is_sds (const struct xccdf_session *session) |
Query if the session is based on Source DataStream. | |
void | xccdf_session_set_rule (struct xccdf_session *session, const char *rule) |
Set rule for session - if rule is not NULL, session will use only this one rule. | |
void | xccdf_session_set_validation (struct xccdf_session *session, bool validate, bool full_validation) |
Set XSD validation level to one of three possibilities:
| |
void | xccdf_session_set_thin_results (struct xccdf_session *session, bool thin_result) |
Set whether the thin results override is enabled. | |
void | xccdf_session_set_datastream_id (struct xccdf_session *session, const char *datastream_id) |
Set requested datastream_id for this session. | |
const char * | xccdf_session_get_datastream_id (struct xccdf_session *session) |
Retrieves the datastream id. | |
void | xccdf_session_set_component_id (struct xccdf_session *session, const char *component_id) |
Set requested component_id for this session. | |
const char * | xccdf_session_get_component_id (struct xccdf_session *session) |
Retrieves the component id. | |
void | xccdf_session_set_benchmark_id (struct xccdf_session *session, const char *benchmark_id) |
Sets requested benchmark_id for this session. | |
const char * | xccdf_session_get_benchmark_id (struct xccdf_session *session) |
Retrieves the benchmark_id. | |
const char * | xccdf_session_get_result_id (struct xccdf_session *session) |
Retrieves the result id xccdf_session. | |
void | xccdf_session_set_user_cpe (struct xccdf_session *session, const char *user_cpe) |
Set path to custom CPE dictionary for the session. | |
void | xccdf_session_set_user_tailoring_file (struct xccdf_session *session, const char *user_tailoring_file) |
Set path to custom Tailoring file for the session. | |
void | xccdf_session_set_user_tailoring_cid (struct xccdf_session *session, const char *user_tailoring_cid) |
Set ID of Tailoring component for the session. | |
void | xccdf_session_set_remote_resources (struct xccdf_session *session, bool allowed, download_progress_calllback_t callback) |
Set properties of remote content. | |
void | xccdf_session_set_loading_flags (struct xccdf_session *session, xccdf_session_loading_flags_t flags) |
Disable or allow loading of depending content (OVAL, SCE, CPE) xccdf_session. | |
void | xccdf_session_set_custom_oval_files (struct xccdf_session *session, char **oval_filenames) |
Set custom oval files for this session xccdf_session. | |
void | xccdf_session_set_custom_oval_eval_fn (struct xccdf_session *session, xccdf_policy_engine_eval_fn eval_fn) |
Set custom OVAL eval function to register with each OVAL session. | |
bool | xccdf_session_set_product_cpe (struct xccdf_session *session, const char *product_cpe) |
Set custom product CPE name. | |
void | xccdf_session_set_without_sys_chars_export (struct xccdf_session *session, bool without_sys_chars) |
Set whether the System Characteristics shall be exported in result files. | |
void | xccdf_session_set_oval_results_export (struct xccdf_session *session, bool to_export_oval_results) |
Set whether the OVAL result files shall be exported. | |
void | xccdf_session_set_check_engine_plugins_results_export (struct xccdf_session *session, bool to_export_results) |
Set that check engine plugin's result files shall be exported. | |
void | xccdf_session_set_sce_results_export (struct xccdf_session *session, bool to_export_sce_results) |
Set that SCE reult files shall be exported. | |
void | xccdf_session_set_oval_variables_export (struct xccdf_session *session, bool to_export_oval_variables) |
Set whether the OVAL variables files shall be exported. | |
bool | xccdf_session_set_xccdf_export (struct xccdf_session *session, const char *xccdf_file) |
Set where to export XCCDF file. | |
bool | xccdf_session_set_xccdf_stig_viewer_export (struct xccdf_session *session, const char *xccdf_stig_viewer_file) |
Set where to export STIG Viewer XCCDF file. | |
bool | xccdf_session_set_arf_export (struct xccdf_session *session, const char *arf_file) |
Set where to export ARF file. | |
bool | xccdf_session_set_report_export (struct xccdf_session *session, const char *report_file) |
Set where to export HTML Report file. | |
bool | xccdf_session_set_profile_id (struct xccdf_session *session, const char *profile_id) |
Select XCCDF Profile for evaluation. | |
int | xccdf_session_set_profile_id_by_suffix (struct xccdf_session *session, const char *profile_suffix) |
Select XCCDF Profile for evaluation with only profile suffix as input. | |
const char * | xccdf_session_get_profile_id (struct xccdf_session *session) |
Retrieves ID of the profile that we will evaluate with, or NULL. | |
struct ds_sds_index * | xccdf_session_get_sds_idx (struct xccdf_session *session) |
Get Source DataStream index of the session. | |
int | xccdf_session_load (struct xccdf_session *session) |
Load and parse all XCCDF structures needed to evaluate this session. | |
int | xccdf_session_load_xccdf (struct xccdf_session *session) |
Load and parse XCCDF file. | |
int | xccdf_session_load_cpe (struct xccdf_session *session) |
Load and parse CPE dictionaries. | |
int | xccdf_session_load_oval (struct xccdf_session *session) |
Load and parse OVAL definitions files for the XCCDF session. | |
int | xccdf_session_load_check_engine_plugin2 (struct xccdf_session *session, const char *plugin_name, bool quiet) |
Load extra check engine from a plugin of given name to the XCCDF session. | |
int | xccdf_session_load_check_engine_plugin (struct xccdf_session *session, const char *plugin_name) |
int | xccdf_session_load_check_engine_plugins (struct xccdf_session *session) |
Load extra check engines (if any are available) to the XCCDF session. | |
int | xccdf_session_load_sce (struct xccdf_session *session) |
int | xccdf_session_load_tailoring (struct xccdf_session *session) |
Load Tailoring file (if applicable) to the XCCDF session. | |
int | xccdf_session_evaluate (struct xccdf_session *session) |
Evaluate XCCDF Policy. | |
int | xccdf_session_export_xccdf (struct xccdf_session *session) |
Export XCCDF file. | |
int | xccdf_session_export_oval (struct xccdf_session *session) |
Export OVAL (result and variables) files. | |
int | xccdf_session_export_check_engine_plugins (struct xccdf_session *session) |
Export results (if any) from any check engine plugins that are loaded. | |
int | xccdf_session_export_sce (struct xccdf_session *session) |
Export SCE files (if enabled by xccdf_session_set_sce_results_export). | |
int | xccdf_session_export_arf (struct xccdf_session *session) |
Export ARF (if enabled by xccdf_session_set_arf_export). | |
struct xccdf_policy_model * | xccdf_session_get_policy_model (const struct xccdf_session *session) |
Get policy_model of the session. | |
struct xccdf_policy * | xccdf_session_get_xccdf_policy (const struct xccdf_session *session) |
Get xccdf_policy of the session. | |
float | xccdf_session_get_base_score (const struct xccdf_session *session) |
Get the base score of the latest XCCDF evaluation in the session. | |
unsigned int | xccdf_session_get_oval_agents_count (const struct xccdf_session *session) |
Get count of OVAL agent sessions not used for CPE in the xccdf_session. | |
unsigned int | xccdf_session_get_cpe_oval_agents_count (const struct xccdf_session *session) |
Get count of OVAL agent sessions for CPE in the xccdf_session. | |
bool | xccdf_session_contains_fail_result (const struct xccdf_session *session) |
Query if the result of evaluation contains FAIL, ERROR, or UNKNOWN rule-result elements. | |
int | xccdf_session_remediate (struct xccdf_session *session) |
Run XCCDF Remediation. | |
int | xccdf_session_build_policy_from_testresult (struct xccdf_session *session, const char *testresult_id) |
Load xccdf:TestResult to the session from file and prepare session for remediation. | |
int | xccdf_session_add_report_from_source (struct xccdf_session *session, struct oscap_source *report_source) |
Load xccdf:TestResult to the session from oscap_source xccdf_session. |