Fixing missed reason for ASB v2's auditEnsurePasswordReuseIsLimited leading to 'audit failure without a reason' (#757)

This commit is contained in:
Marius Niculescu 2024-08-16 11:30:19 -07:00 коммит произвёл GitHub
Родитель cf522e87b0
Коммит e2bf390384
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -15,7 +15,7 @@
"version": "1.0.0",
"contentType": "Custom",
"contentUri": "https://github.com/Azure/azure-osconfig/releases/download/test_policy_package/LinuxSecurityBaseline.zip",
"contentHash": "BB0A66C1D4E43EDDDD8084CEF6515DB9D27E6F7C5425F29260372FEAB260E8BA",
"contentHash": "6E58CCBA2236ED616C7003C80AB600C83461889A10521235C15B15C228C74E33",
"configurationParameter": {
"accessPermissionsForSshdConfig": "Ensure that permissions on /etc/ssh/sshd_config are configured;DesiredObjectValue",
"ignoreHosts": "Ensure that the SSH IgnoreRhosts is configured;DesiredObjectValue",
@ -625,7 +625,7 @@
"version": "1.0.0",
"contentType": "Custom",
"contentUri": "https://github.com/Azure/azure-osconfig/releases/download/test_policy_package/LinuxSecurityBaseline.zip",
"contentHash": "BB0A66C1D4E43EDDDD8084CEF6515DB9D27E6F7C5425F29260372FEAB260E8BA",
"contentHash": "6E58CCBA2236ED616C7003C80AB600C83461889A10521235C15B15C228C74E33",
"assignmentType": "ApplyAndAutoCorrect",
"configurationParameter": [
{
@ -716,7 +716,7 @@
"version": "1.0.0",
"contentType": "Custom",
"contentUri": "https://github.com/Azure/azure-osconfig/releases/download/test_policy_package/LinuxSecurityBaseline.zip",
"contentHash": "BB0A66C1D4E43EDDDD8084CEF6515DB9D27E6F7C5425F29260372FEAB260E8BA",
"contentHash": "6E58CCBA2236ED616C7003C80AB600C83461889A10521235C15B15C228C74E33",
"assignmentType": "ApplyAndAutoCorrect",
"configurationParameter": [
{
@ -807,7 +807,7 @@
"version": "1.0.0",
"contentType": "Custom",
"contentUri": "https://github.com/Azure/azure-osconfig/releases/download/test_policy_package/LinuxSecurityBaseline.zip",
"contentHash": "BB0A66C1D4E43EDDDD8084CEF6515DB9D27E6F7C5425F29260372FEAB260E8BA",
"contentHash": "6E58CCBA2236ED616C7003C80AB600C83461889A10521235C15B15C228C74E33",
"assignmentType": "ApplyAndAutoCorrect",
"configurationParameter": [
{

Просмотреть файл

@ -15,7 +15,7 @@
"version": "1.0.0",
"contentType": "Custom",
"contentUri": "https://github.com/Azure/azure-osconfig/releases/download/test_policy_package/LinuxSshServerSecurityBaseline.zip",
"contentHash": "2DB90AF66A960546791419F03765241CCD9E9223481F613D824BBFB64244DAF2",
"contentHash": "602C8A966101CF220262D8A0109C41842297A8A5AF44CBA88086CA8761C9D1F2",
"configurationParameter": {
"accessPermissionsForSshdConfig": "Ensure that permissions on /etc/ssh/sshd_config are configured;DesiredObjectValue",
"ignoreHosts": "Ensure that the SSH IgnoreRhosts is configured;DesiredObjectValue",
@ -624,7 +624,7 @@
"version": "1.0.0",
"contentType": "Custom",
"contentUri": "https://github.com/Azure/azure-osconfig/releases/download/test_policy_package/LinuxSshServerSecurityBaseline.zip",
"contentHash": "2DB90AF66A960546791419F03765241CCD9E9223481F613D824BBFB64244DAF2",
"contentHash": "602C8A966101CF220262D8A0109C41842297A8A5AF44CBA88086CA8761C9D1F2",
"assignmentType": "ApplyAndAutoCorrect",
"configurationParameter": [
{
@ -715,7 +715,7 @@
"version": "1.0.0",
"contentType": "Custom",
"contentUri": "https://github.com/Azure/azure-osconfig/releases/download/test_policy_package/LinuxSshServerSecurityBaseline.zip",
"contentHash": "2DB90AF66A960546791419F03765241CCD9E9223481F613D824BBFB64244DAF2",
"contentHash": "602C8A966101CF220262D8A0109C41842297A8A5AF44CBA88086CA8761C9D1F2",
"assignmentType": "ApplyAndAutoCorrect",
"configurationParameter": [
{
@ -806,7 +806,7 @@
"version": "1.0.0",
"contentType": "Custom",
"contentUri": "https://github.com/Azure/azure-osconfig/releases/download/test_policy_package/LinuxSshServerSecurityBaseline.zip",
"contentHash": "2DB90AF66A960546791419F03765241CCD9E9223481F613D824BBFB64244DAF2",
"contentHash": "602C8A966101CF220262D8A0109C41842297A8A5AF44CBA88086CA8761C9D1F2",
"assignmentType": "ApplyAndAutoCorrect",
"configurationParameter": [
{

Просмотреть файл

@ -66,13 +66,13 @@ int CheckEnsurePasswordReuseIsLimited(int remember, char** reason, void* log)
if (0 == CheckFileExists(g_etcPamdCommonPassword, NULL, log))
{
// On Debian-based systems '/etc/pam.d/common-password' is expected to exist
status = ((0 == CheckLineFoundNotCommentedOut(g_etcPamdCommonPassword, '#', g_remember, NULL, log)) &&
status = ((0 == CheckLineFoundNotCommentedOut(g_etcPamdCommonPassword, '#', g_remember, reason, log)) &&
(0 == CheckIntegerOptionFromFileLessOrEqualWith(g_etcPamdCommonPassword, g_remember, '=', remember, reason, log))) ? 0 : ENOENT;
}
else if (0 == CheckFileExists(g_etcPamdSystemAuth, NULL, log))
{
// On Red Hat-based systems '/etc/pam.d/system-auth' is expected to exist
status = ((0 == CheckLineFoundNotCommentedOut(g_etcPamdSystemAuth, '#', g_remember, NULL, log)) &&
status = ((0 == CheckLineFoundNotCommentedOut(g_etcPamdSystemAuth, '#', g_remember, reason, log)) &&
(0 == CheckIntegerOptionFromFileLessOrEqualWith(g_etcPamdSystemAuth, g_remember, '=', remember, reason, log))) ? 0 : ENOENT;
}
else