Skip to content

Commit b1bc20c

Browse files
author
Trong Nhan Mai
committed
chore: update policy to include more checks and update expected vsa payload
1 parent 60d0cab commit b1bc20c

File tree

2 files changed

+5
-2
lines changed
  • tests
    • policy_engine/resources/policies/example-maven-project
    • vsa/integration/local_witness_example-maven-project

2 files changed

+5
-2
lines changed

tests/policy_engine/resources/policies/example-maven-project/policy.dl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
#include "prelude.dl"
55

66
Policy("gh_witness_provenance_policy", component_id, "Policy for github Maven project with witness provenances") :-
7+
check_passed(component_id, "mcn_build_service_1"),
8+
check_passed(component_id, "mcn_build_script_1"),
9+
check_passed(component_id, "mcn_provenance_available_1"),
710
check_passed(component_id, "mcn_provenance_expectation_1").
811

912
apply_policy_to("gh_witness_provenance_policy", component_id) :-

tests/vsa/integration/local_witness_example-maven-project/vsa_payload.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"macaron": "0.9.0"
1717
}
1818
},
19-
"timeVerified": "2024-04-16T01:01:54.925488+00:00",
19+
"timeVerified": "2024-04-19T00:42:58.916316+00:00",
2020
"resourceUri": "pkg:maven/io.github.behnazh-w.demo/[email protected]",
2121
"policy": {
22-
"content": "/* Copyright (c) 2024 - 2024, Oracle and/or its affiliates. All rights reserved. */\n/* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. */\n\n#include \"prelude.dl\"\n\nPolicy(\"gh_witness_provenance_policy\", component_id, \"Policy for github Maven project with witness provenances\") :-\n check_passed(component_id, \"mcn_provenance_expectation_1\").\n\napply_policy_to(\"gh_witness_provenance_policy\", component_id) :-\n is_repo(\n _, // repo_id\n \"github.com/behnazh-w/example-maven-app\", // http URL to the repo but without the \"http://\"\n component_id\n ).\n"
22+
"content": "/* Copyright (c) 2024 - 2024, Oracle and/or its affiliates. All rights reserved. */\n/* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. */\n\n#include \"prelude.dl\"\n\nPolicy(\"gh_witness_provenance_policy\", component_id, \"Policy for github Maven project with witness provenances\") :-\n check_passed(component_id, \"mcn_build_service_1\"),\n check_passed(component_id, \"mcn_build_script_1\"),\n check_passed(component_id, \"mcn_provenance_available_1\"),\n check_passed(component_id, \"mcn_provenance_expectation_1\").\n\napply_policy_to(\"gh_witness_provenance_policy\", component_id) :-\n is_repo(\n _, // repo_id\n \"github.com/behnazh-w/example-maven-app\", // http URL to the repo but without the \"http://\"\n component_id\n ).\n"
2323
},
2424
"verificationResult": "PASSED",
2525
"verifiedLevels": []

0 commit comments

Comments
 (0)