We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A policy with AllowedRiskSeverity as a list fails to create:
AllowedRiskSeverity
$ curl -XPOST -H'content-type: application/json' -d '{"Policy":{"Name":"High","AllowedRiskSeverity":"[\"Negligible\",\"Low\",\"Medium\"]"}}' localhost:31700/v1/policies {"Error":{"Message":"error upserting policy: pq: malformed array literal: \"{[\"Negligible\",\"Low\",\"Medium\"]}\""}}
The value is treated as a list when listing an image's vulnerabilities:
portauthority/api/v1/routes.go
Line 962 in f2513f0
Maybe there's some marshaling required here: https://github.com/target/portauthority/blob/master/pkg/datastore/pgsql/policy.go#L60 ? My golang isn't too strong. Will try to look more into this tomorrow.
The text was updated successfully, but these errors were encountered:
@caipre try it like this. AllowedRiskSeverity is a string on the input currently.
curl -XPOST -H'content-type: application/json' -d '{"Policy":{"Name":"High","AllowedRiskSeverity":"Negligible,Low,Medium"}}' http://localhost:31700/v1/policies
Sorry, something went wrong.
No branches or pull requests
A policy with
AllowedRiskSeverity
as a list fails to create:The value is treated as a list when listing an image's vulnerabilities:
portauthority/api/v1/routes.go
Line 962 in f2513f0
Maybe there's some marshaling required here: https://github.com/target/portauthority/blob/master/pkg/datastore/pgsql/policy.go#L60 ? My golang isn't too strong. Will try to look more into this tomorrow.
The text was updated successfully, but these errors were encountered: