Skip to main content

Require GitHub Repository Discovery Evidence

Type: Rule
ID: github-repo-exists
Source: v2/rules/github/repository/evidence-exists.yaml
Rego Source: evidence-exists.rego
Labels: GitHub, Repository

Verify the GitHub Repository exists as evidence.

note

This rule requires Github Repository Discovery Evidence. See here for more details.

tip

Evidence IS required for this rule and will fail if missing.

tip

Signed Evidence for this rule IS NOT required by default but is recommended.

warning

Rule requires evaluation with a target. Without one, it will be disabled unless the --all-evidence flag is provided.

Usage example

uses: github/repository/evidence-exists@v2

Evidence Requirements

FieldValue
signedFalse
content_body_typegeneric
target_typedata
predicate_typehttp://scribesecurity.com/evidence/discovery/v0.1
asset_platformgithub
asset_typerepo
asset_nameTemplate value (see below)

Template Value (see here for more details)

{{- if eq .Context.asset_type "repo" -}}
{{- on_target .Context.asset_name -}}
{{- else -}}
{{- on_target nil -}}
{{- end -}}