Skip to content

Commit

Permalink
Add the check for official repositories for Debian 11
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedonno1337 committed Oct 10, 2021
1 parent c61ca29 commit 76e580f
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<def-group>
<definition class="compliance" id="apt_sources_list_official" version="1">
{{{ oval_metadata("Official distribution repositories contain up-to-date distribution security and functional patches.") }}}
<criteria comment="Match sources.list distribution repositories usage" operator="AND">
<criterion comment="Check /etc/apt/sources(.d/.+).list file for base" test_ref="test_apt_sources_list_base_official" />
<criterion comment="Check /etc/apt/sources(.d/.+).list file for security" test_ref="test_apt_sources_list_security_official" />
</criteria>
</definition>
<ind:textfilecontent54_test check="all" check_existence="at_least_one_exists" comment="Checks usage of official distribution base repositories"
id="test_apt_sources_list_base_official" version="1">
<ind:object object_ref="obj_apt_sources_list_base_official" />
</ind:textfilecontent54_test>
<ind:textfilecontent54_object id="obj_apt_sources_list_base_official" version="1">
<ind:filepath operation="pattern match">^/etc/apt/sources(.d\/[a-zA-Z0-9]+){0,1}.list$</ind:filepath>
<ind:pattern operation="pattern match">^deb[\s]+http://[a-z\.]+\.debian\.org/debian[/]?[\s]+bullseye[\s]+main</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>
<ind:textfilecontent54_test check="all" check_existence="at_least_one_exists" comment="Checks usage of official distribution security repositories"
id="test_apt_sources_list_security_official" version="1">
<ind:object object_ref="obj_apt_sources_list_security_official" />
</ind:textfilecontent54_test>
<ind:textfilecontent54_object id="obj_apt_sources_list_security_official" version="1">
<ind:filepath operation="pattern match">^/etc/apt/sources(.d\/[a-zA-Z0-9]+){0,1}.list$</ind:filepath>
<ind:pattern operation="pattern match">^deb[\s]+http://security\.debian\.org/debian-security[/]?[\s]+bullseye-security[\s]+main</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>
</def-group>

0 comments on commit 76e580f

Please sign in to comment.