Skip to content

Commit 2183174

Browse files
committed
update init file name; add defauly policy name to eval
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
1 parent 6887386 commit 2183174

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

app/cli/cmd/policy_develop_eval.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,12 @@ evaluates the policy against the provided material or attestation.`,
6565
},
6666
}
6767

68-
cmd.Flags().StringVar(&materialPath, "material", "", "path to material or attestation file")
68+
cmd.Flags().StringVar(&materialPath, "material", "", "Path to material or attestation file")
6969
cobra.CheckErr(cmd.MarkFlagRequired("material"))
70-
cmd.Flags().StringVar(&kind, "kind", "", fmt.Sprintf("kind of the material: %q", schemaapi.ListAvailableMaterialKind()))
71-
cmd.Flags().StringSliceVar(&annotations, "annotation", []string{}, "key-value pairs of material annotations (key=value)")
72-
cmd.Flags().StringVar(&policyPath, "policy", "", "path to custom policy file")
73-
cobra.CheckErr(cmd.MarkFlagRequired("policy"))
74-
cmd.Flags().StringSliceVar(&inputs, "input", []string{}, "key-value pairs of policy inputs (key=value)")
70+
cmd.Flags().StringVar(&kind, "kind", "", fmt.Sprintf("Kind of the material: %q", schemaapi.ListAvailableMaterialKind()))
71+
cmd.Flags().StringSliceVar(&annotations, "annotation", []string{}, "Key-value pairs of material annotations (key=value)")
72+
cmd.Flags().StringVarP(&policyPath, "policy", "p", "policy.yaml", "Path to custom policy file")
73+
cmd.Flags().StringSliceVar(&inputs, "input", []string{}, "Key-value pairs of policy inputs (key=value)")
7574

7675
return cmd
7776
}

app/cli/internal/policydevel/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var templateFS embed.FS
3131
const (
3232
policyTemplateRegoPath = "templates/example-policy.rego"
3333
policyTemplatePath = "templates/example-policy.yaml"
34-
defaultPolicyName = "chainloop-policy"
34+
defaultPolicyName = "policy"
3535
defaultPolicyDescription = "Chainloop validation policy"
3636
defaultMaterialKind = "SBOM_CYCLONEDX_JSON"
3737
)

0 commit comments

Comments
 (0)