Skip to content

Commit

Permalink
[fix] Do not allow skipping of security checks via config file
Browse files Browse the repository at this point in the history
There were already protections in place for individual file paths and
inspections named on the command line, but this picks up local config
files that have disabled an inspection with security checks in it.

Fixes: #1374

Signed-off-by: David Cantrell <dcantrell@redhat.com>
  • Loading branch information
dcantrell committed May 2, 2024
1 parent c3dab63 commit 002653c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/flags.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bool process_inspection_flag(const char *inspection, const bool exclude, uint64_
for (i = 0; inspections[i].name != NULL; i++) {
if (!strcasecmp(inspection, inspections[i].name)) {
/* user specified a valid inspection */
if (exclude) {
if (exclude && inspections[i].security_checks == false) {
*selected &= ~(inspections[i].flag);
found = true;
break;
Expand Down

0 comments on commit 002653c

Please sign in to comment.