Skip to content

Commit 830ea1d

Browse files
committed
Use blocked paths in yamlfilecontent probe
1 parent e4ea549 commit 830ea1d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/OVAL/probes/independent/yamlfilecontent_probe.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ static int process_yaml_file(const char *prefix, const char *path, const char *f
396396
yaml_parser_initialize(&parser);
397397

398398
char *filepath = oscap_path_join(path, filename);
399+
if (probe_path_is_blocked(filepath, ctx->blocked_paths)) {
400+
goto cleanup;
401+
}
399402
char *filepath_with_prefix = oscap_path_join(prefix, filepath);
400403

401404
FILE *yaml_file = fopen(filepath_with_prefix, "r");

0 commit comments

Comments
 (0)