-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
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
Add EC checks for StepActions #1640
Conversation
Draft until enterprise-contract/ec-policies#1232 is merged. |
fab55c6
to
18437f6
Compare
9cf5335
to
6dc26fe
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/tekton/scripts/script-3-swb4p: line 11: find: command not found
[DEBUG] Files parameter:
Error: required flag(s) "file" not set
The ec-cli image doesn't have find
, so something like Zoran's suggestion will be needed
9929789
to
cdec316
Compare
@@ -18,9 +18,14 @@ spec: | |||
# the cluster will set imagePullPolicy to IfNotPresent | |||
workingDir: $(workspaces.source.path)/source | |||
script: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra changes needed to make checkton happy.
/retest
|
/retest |
Hmm EC reporting a failure for
It requires authentication which we can't do from a PR. How important is the image accessible check? 🤔 UPDATE: Ah! Need a new version of the ec-clli that understands the "severity" result metadata. |
There is a similar check for image accessibility for Task definitions which should be triggering a violation here (no secret to access that image from a pull request). But EC is currently passing due to a bug enterprise-contract/ec-policies#1237. Not sure how to proceed here. |
Because the check happens in Konflux, there is probably a way to pipe the secrets to the ec-check Task. |
ad93d5e
to
9be9717
Compare
Ok. This seems to be sorted out now. Please have another looks 🙏 |
# in the namespace, but that is currently disabled so it's wild west. | ||
runAsUser: 0 | ||
env: | ||
- name: HOME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed so EC finds the authfile 🤷
And it also, for some reason, makes runAsUser
required. Quite odd.
Hmm, maybe we want it to fail. A while back, Gal went around changing all the images to publicly accessible ones for the community version of Konflux. Maybe add an exception for this rule for now (for the specific tasks/stepactions if possible) and we should gradually move them away from using registry.redhat.io images |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nitpickery inside
hack/ec-checks.sh
Outdated
fi | ||
local d=$1 | ||
|
||
while IFS= read -r -d '' f; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just by using bash this can be done like:
while IFS= read -r -d '' f; do | |
shopt -s globstar | |
for f in stepactions/**/*.yaml; do |
Ref: https://issues.redhat.com/browse/EC-1010 Signed-off-by: Luiz Carvalho <[email protected]>
The reason it was failing it's because EC wasn't seeing the registry auth file. That's fixed and things are working as expected. |
Ref: https://issues.redhat.com/browse/EC-1010
Before you complete this pull request ...
Look for any open pull requests in the repository with the title "e2e-tests update" and
see if there are recent e2e-tests updates that will be applicable to your change.