Skip to content

Commit 7b80d2f

Browse files
committed
feat: add sample policies
Signed-off-by: Demolus13 <[email protected]>
1 parent 664a5b1 commit 7b80d2f

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include "prelude.dl"
2+
3+
Policy("github_actions_vulns", component_id, "GitHub Actions Vulnerability Detection") :-
4+
check_passed(component_id, "mcn_githubactions_vulnerabilities_1").
5+
6+
apply_policy_to("github_actions_vulns", component_id) :-
7+
is_component(component_id, purl),
8+
match("<PACKAGE_PURL>@.*", purl).
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include "prelude.dl"
2+
3+
Policy("check-dependencies", component_id, "Check the dependencies of component.") :-
4+
transitive_dependency(component_id, dependency),
5+
check_passed(component_id, "mcn_detect_malicious_metadata_1"),
6+
check_passed(dependency, "mcn_detect_malicious_metadata_1").
7+
8+
apply_policy_to("check-dependencies", component_id) :-
9+
is_component(component_id, purl),
10+
match("<PACKAGE_PURL>@.*", purl).
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include "prelude.dl"
2+
3+
Policy("check-component", component_id, "Check component artifacts.") :-
4+
check_passed(component_id, "mcn_detect_malicious_metadata_1").
5+
6+
7+
apply_policy_to("check-component", component_id) :-
8+
is_component(component_id, purl),
9+
match("<PACKAGE_PURL>@.*", purl).

0 commit comments

Comments
 (0)