oracle / oracle/macaron

Host policies for VSAs of SLSA Build Levels

Open
#837 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

policy engine vsa
Dominant language
Python
Stars
210
Forks
36
Avg merge
1d 10h
Merged PRs (30d)
2

Description

Currently, we store the content of the policy in a VSA and do not report the verifiedLevels as required by the VSA specification. See this example VSA.

Macaron policies do not always map clearly to SLSA Build Levels. But for cases where such a mapping is possible, we can host the policies in the Macaron's GitHub repository and use the link in the VSA's predicate.policy.uri. We can then report the corresponding SLSA Build Level in predicate.verifiedLevels.

At the moment, Macaron's policies require a target software component to be specified in the policy itself. To host policies described above, we can include these hosted policies as libraries and require the user to add the additional apply_policy_to rule e.g.,

apply_policy_to("SLSA_BUILD_LEVEL_1", component_id) :-
    is_component(component_id, purl),
    match("pkg:pypi/django@.*", purl).

Alternatively, we can add a feature that takes the target software component as input of the verify-policy command and use a templating system to generate the final policy for the policy engine (Souffle).

Related issues:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the VSA schema and example, then read the verify-policy command documentation and related issues #403 and #787. Determine whether hosted policies or verify-policy templating is the intended approach; done means policies can be hosted, referenced by predicate.policy.uri, and their corresponding SLSA levels reported in predicate.verifiedLevels.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.