-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review rpm_verify_permissions rule #11335
Merged
jan-cerny
merged 3 commits into
ComplianceAsCode:master
from
marcusburghardt:rpm_verify_permissions_review
Dec 5, 2023
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
34 changes: 20 additions & 14 deletions
34
...ware/integrity/software-integrity/rpm_verification/rpm_verify_permissions/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,27 +1,33 @@ | ||
<def-group> | ||
<definition class="compliance" id="rpm_verify_permissions" version="3"> | ||
{{{ oval_metadata("Verify the permissions of installed packages | ||
by comparing the installed files with information about the | ||
files taken from the package metadata stored in the RPM | ||
database.") }}} | ||
<definition class="compliance" id="{{{ rule_id }}}" version="3"> | ||
{{{ oval_metadata("Verify the permissions of installed packages by comparing the installed | ||
files with information about the files taken from the package metadata stored in the RPM | ||
database.") }}} | ||
<criteria> | ||
<criterion test_ref="test_verify_all_rpms_mode" comment="mode of all files matches local rpm database" /> | ||
<criterion test_ref="test_rpm_verify_permissions" | ||
comment="mode of all files matches local rpm database"/> | ||
</criteria> | ||
</definition> | ||
<linux:rpmverifyfile_test check_existence="none_exist" id="test_verify_all_rpms_mode" version="1" check="all" comment="mode of all files matches local rpm database"> | ||
<linux:object object_ref="object_files_fail_mode"/> | ||
</linux:rpmverifyfile_test> | ||
<linux:rpmverifyfile_object id="object_files_fail_mode" version="1" comment="rpm verify of all files"> | ||
|
||
<linux:rpmverifyfile_state id="state_rpm_verify_permissions_files_fail_mode" version="1"> | ||
<linux:mode_differs>fail</linux:mode_differs> | ||
</linux:rpmverifyfile_state> | ||
|
||
<linux:rpmverifyfile_object id="object_rpm_verify_permissions_files_fail_mode" version="1" | ||
comment="rpm verify permissions 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_mode</filter> | ||
<filter action="include">state_rpm_verify_permissions_files_fail_mode</filter> | ||
</linux:rpmverifyfile_object> | ||
<linux:rpmverifyfile_state id="state_files_fail_mode" version="1"> | ||
<linux:mode_differs>fail</linux:mode_differs> | ||
</linux:rpmverifyfile_state> | ||
|
||
<linux:rpmverifyfile_test id="test_rpm_verify_permissions" version="1" | ||
check="all" check_existence="none_exist" | ||
comment="mode of all files matches local rpm database"> | ||
<linux:object object_ref="object_rpm_verify_permissions_files_fail_mode"/> | ||
</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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the link to the article should be present only in RHEL products because users who aren't Red Hat customers can't access this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done