-
Notifications
You must be signed in to change notification settings - Fork 684
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
Fix in sudo_require_reauthentication #10216
Merged
ggbecker
merged 11 commits into
ComplianceAsCode:master
from
rumch-se:fix_sudo_require_reauthentication
Apr 28, 2023
Merged
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
565ad17
Fix in sudo_require_reauthentication
rumch-se ec258b5
A coorecting checkig for sudo package
rumch-se ab76550
a correction in OVAL part
rumch-se 321f21c
A correction in regex in OVAL
rumch-se cdf16d9
correction in oval - regexp and tests
rumch-se 3aaa567
New tests added
rumch-se bd8ea99
New tests added
rumch-se b2e383b
Missing wrong_value_2.fail.sh test added
rumch-se c3c9214
Update in OVAL regexp , updates in tests
rumch-se 7f505d1
Update shared.xml
rumch-se cd002f1
Deletion of 2 tests
rumch-se 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
15 changes: 5 additions & 10 deletions
15
linux_os/guide/system/software/sudo/sudo_require_reauthentication/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,25 +1,20 @@ | ||
<def-group> | ||
<definition class="compliance" id="{{{ rule_id }}}" version="1"> | ||
{{{ oval_metadata("'Ensure sudo timestamp_timeout is appropriate - sudo timestamp_timeout") }}} | ||
<criteria comment="The timestamp_timeout should be configured" > | ||
<criteria comment="The timestamp_timeout should be configured"> | ||
<criterion comment="check configuration in /etc/sudoers" test_ref="test_sudo_timestamp_timeout" /> | ||
</criteria> | ||
</definition> | ||
|
||
<!-- Define test for sudo timestamp. --> | ||
<ind:textfilecontent54_test check="all" check_existence="only_one_exists" comment="check correct configuration in /etc/sudoers" id="test_sudo_timestamp_timeout" version="1"> | ||
<ind:object object_ref="obj_sudo_timestamp_timeout"/> | ||
<ind:state state_ref="state_sudo_timestamp_timeout" /> | ||
</ind:textfilecontent54_test> | ||
|
||
<ind:textfilecontent54_object id="obj_sudo_timestamp_timeout" version="1"> | ||
<ind:filepath operation="pattern match">^/etc/sudoers(\.d/.*)?$</ind:filepath> | ||
<ind:pattern operation="pattern match">^[\s]*Defaults[\s]+timestamp_timeout[\s]*=[\s]*([-]?[\d]+)$</ind:pattern> | ||
<ind:instance datatype="int" operation="greater than or equal">1</ind:instance> | ||
<ind:filepath operation="pattern match">^\/etc\/(sudoers|sudoers\.d\/*)$</ind:filepath> | ||
<ind:pattern operation="pattern match">^[\s]*Defaults[\s]+timestamp_timeout[\s]*=\s*[0-9]+$</ind:pattern> | ||
<ind:instance datatype="int" operation="equals">1</ind:instance> | ||
</ind:textfilecontent54_object> | ||
|
||
<ind:textfilecontent54_state id="state_sudo_timestamp_timeout" | ||
version="1"> | ||
<ind:subexpression datatype="int" operation="greater than or equal">0</ind:subexpression> | ||
</ind:textfilecontent54_state> | ||
|
||
</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
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.
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.
It looks like it's missing the proper
capture all
element here