-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11333 from marcusburghardt/rpm_verify_ownership_r…
…eview Review rpm_verify_ownership rule
- Loading branch information
Showing
2 changed files
with
38 additions
and
43 deletions.
There are no files selected for viewing
51 changes: 21 additions & 30 deletions
51
...ftware/integrity/software-integrity/rpm_verification/rpm_verify_ownership/oval/shared.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,35 @@ | ||
<def-group> | ||
<definition class="compliance" id="rpm_verify_ownership" version="3"> | ||
{{{ oval_metadata("Verify ownership of installed packages | ||
by comparing the installed files with information about the | ||
files taken from the package metadata stored in the RPM | ||
<definition class="compliance" id="{{{ rule_id }}}" version="3"> | ||
{{{ oval_metadata("Verify ownership of installed packages by comparing the installed files | ||
with information about the files taken from the package metadata stored in the RPM | ||
database.") }}} | ||
<criteria operator="AND"> | ||
<criterion test_ref="test_verify_all_rpms_user_ownership" comment="user ownership of all files matches local rpm database" /> | ||
<criterion test_ref="test_verify_all_rpms_group_ownership" comment="group ownership of all files matches local rpm database" /> | ||
<criterion test_ref="test_rpm_verify_ownership_verify_all_rpms_ownership" | ||
comment="user ownership of all files matches local rpm database"/> | ||
</criteria> | ||
</definition> | ||
<linux:rpmverifyfile_test check_existence="none_exist" id="test_verify_all_rpms_user_ownership" version="1" check="all" comment="user ownership of all files matches local rpm database"> | ||
<linux:object object_ref="object_files_fail_user_ownership"/> | ||
</linux:rpmverifyfile_test> | ||
<linux:rpmverifyfile_test check_existence="none_exist" id="test_verify_all_rpms_group_ownership" version="1" check="all" comment="group ownership of all files matches local rpm database"> | ||
<linux:object object_ref="object_files_fail_group_ownership"/> | ||
</linux:rpmverifyfile_test> | ||
<linux:rpmverifyfile_object id="object_files_fail_user_ownership" version="1" comment="rpm verify of all files"> | ||
<linux:behaviors nomd5="true" noghostfiles="true"/> | ||
<linux:name operation="pattern match">.*</linux:name> | ||
<linux:epoch operation="pattern match">.*</linux:epoch> | ||
<linux:version operation="pattern match">.*</linux:version> | ||
<linux:release operation="pattern match">.*</linux:release> | ||
<linux:arch operation="pattern match">.*</linux:arch> | ||
<linux:filepath operation="pattern match">.*</linux:filepath> | ||
<filter action="include">state_files_fail_user_ownership</filter> | ||
</linux:rpmverifyfile_object> | ||
<linux:rpmverifyfile_object id="object_files_fail_group_ownership" version="1" comment="rpm verify of all files"> | ||
|
||
<linux:rpmverifyfile_state id="state_rpm_verify_ownership_files_fail_ownership" version="2" | ||
operator="OR"> | ||
<linux:ownership_differs>fail</linux:ownership_differs> | ||
<linux:group_differs>fail</linux:group_differs> | ||
</linux:rpmverifyfile_state> | ||
|
||
<linux:rpmverifyfile_object id="object_rpm_verify_ownership_files_fail_ownership" version="2" | ||
comment="rpm verify ownership of all files"> | ||
<linux:behaviors nomd5="true" noghostfiles="true"/> | ||
<linux:name operation="pattern match">.*</linux:name> | ||
<linux:epoch operation="pattern match">.*</linux:epoch> | ||
<linux:version operation="pattern match">.*</linux:version> | ||
<linux:release operation="pattern match">.*</linux:release> | ||
<linux:arch operation="pattern match">.*</linux:arch> | ||
<linux:filepath operation="pattern match">.*</linux:filepath> | ||
<filter action="include">state_files_fail_group_ownership</filter> | ||
<filter action="include">state_rpm_verify_ownership_files_fail_ownership</filter> | ||
</linux:rpmverifyfile_object> | ||
<linux:rpmverifyfile_state id="state_files_fail_user_ownership" version="1"> | ||
<linux:ownership_differs>fail</linux:ownership_differs> | ||
</linux:rpmverifyfile_state> | ||
<linux:rpmverifyfile_state id="state_files_fail_group_ownership" version="1"> | ||
<linux:group_differs>fail</linux:group_differs> | ||
</linux:rpmverifyfile_state> | ||
|
||
<linux:rpmverifyfile_test id="test_rpm_verify_ownership_verify_all_rpms_ownership" version="1" | ||
check="all" check_existence="none_exist" | ||
comment="Ownership of all files matches local rpm database"> | ||
<linux:object object_ref="object_rpm_verify_ownership_files_fail_ownership"/> | ||
</linux:rpmverifyfile_test> | ||
</def-group> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters