Skip to content

Commit 8d8fb44

Browse files
authored
fix(policy-devel): inputs don't accept multiple values (#2355)
Signed-off-by: Sylwester Piskozub <[email protected]>
1 parent 57794c1 commit 8d8fb44

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/cli/cmd/policy_develop_eval.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ evaluates the policy against the provided material or attestation.`,
7272
cmd.Flags().StringVar(&kind, "kind", "", fmt.Sprintf("Kind of the material: %q", schemaapi.ListAvailableMaterialKind()))
7373
cmd.Flags().StringSliceVar(&annotations, "annotation", []string{}, "Key-value pairs of material annotations (key=value)")
7474
cmd.Flags().StringVarP(&policyPath, "policy", "p", "policy.yaml", "Path to custom policy file")
75-
cmd.Flags().StringSliceVar(&inputs, "input", []string{}, "Key-value pairs of policy inputs (key=value)")
75+
cmd.Flags().StringArrayVar(&inputs, "input", []string{}, "Key-value pairs of policy inputs (key=value)")
7676
cmd.Flags().StringSliceVar(&allowedHostnames, "allowed-hostnames", []string{}, "Additional hostnames allowed for http.send requests in policies")
7777

7878
return cmd

app/cli/documentation/cli-reference.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2848,7 +2848,7 @@ Options
28482848
--allowed-hostnames strings Additional hostnames allowed for http.send requests in policies
28492849
--annotation strings Key-value pairs of material annotations (key=value)
28502850
-h, --help help for eval
2851-
--input strings Key-value pairs of policy inputs (key=value)
2851+
--input stringArray Key-value pairs of policy inputs (key=value)
28522852
--kind string Kind of the material: ["ARTIFACT" "ATTESTATION" "BLACKDUCK_SCA_JSON" "CHAINLOOP_RUNNER_CONTEXT" "CONTAINER_IMAGE" "CSAF_INFORMATIONAL_ADVISORY" "CSAF_SECURITY_ADVISORY" "CSAF_SECURITY_INCIDENT_RESPONSE" "CSAF_VEX" "EVIDENCE" "GHAS_CODE_SCAN" "GHAS_DEPENDENCY_SCAN" "GHAS_SECRET_SCAN" "GITLAB_SECURITY_REPORT" "HELM_CHART" "JACOCO_XML" "JUNIT_XML" "OPENVEX" "SARIF" "SBOM_CYCLONEDX_JSON" "SBOM_SPDX_JSON" "SLSA_PROVENANCE" "STRING" "TWISTCLI_SCAN_JSON" "ZAP_DAST_ZIP"]
28532853
--material string Path to material or attestation file
28542854
-p, --policy string Path to custom policy file (default "policy.yaml")

0 commit comments

Comments
 (0)