Skip to content
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

feat(KONFLUX-2742) add a file upload function #247

Closed
wants to merge 1 commit into from
Closed

Conversation

ralphbean
Copy link
Member

The intent is to use this in the snyk sast task to upload the sarif result to the registry for later post-processing by other systems.

@ralphbean
Copy link
Member Author

I've got a build of oras at https://github.com/ralphbean/oras which is what is referenced in the Dockerfile here. We shouldn't really merge that but should move that repo to github.com/konflux-ci and into some better workspace. Just PoC here.

The intent is to use this in the snyk sast task to upload the sarif
result to the registry for later post-processing by other systems.

Signed-off-by: Ralph Bean <[email protected]>
exit 2
fi

if ! raw_inspect_output=$(skopeo inspect --no-tags docker://"${OCI_SUBJECT}"); then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd not call it raw because it's without skopeo --raw option

echo "Failed to inspect ${OCI_SUBJECT}" >&2
exit 2
fi
if ! DIGEST=$(echo "${raw_inspect_output}" | jq -r .Digest | sed 's/:/-/'); then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which digest do we care about here? I't think it's only manifest digest, what should be done in case of index image?

skopeo inspect --raw docker://"${OCI_SUBJECT}" | sha256sum will work for all cases

@ralphbean ralphbean marked this pull request as draft April 30, 2024 00:13
@ralphbean
Copy link
Member Author

konflux-ci/build-definitions#992 and https://github.com/konflux-ci/oras-container/ replace this.

I'm dropping this one.

@ralphbean ralphbean closed this May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants