-
Notifications
You must be signed in to change notification settings - Fork 9
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
scripts: Start of new requirements installer #2408
base: main
Are you sure you want to change the base?
Conversation
The reason why I picked the For example:
|
scripts/requirements.sh
Outdated
checksum="$(sha256sum "${target}")" | ||
if [[ "${checksum_bin}" == "${checksum%%" "*}" ]]; then |
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.
checksum="$(sha256sum "${target}")" | |
if [[ "${checksum_bin}" == "${checksum%%" "*}" ]]; then | |
if sha256sum --check - <<< "${checksum_bin} ${target}" >/dev/null 2>/dev/null; then |
Could save a tiny bit of string wrangling, but should otherwise be equivalent.
Sure but if that is going to be a consideration then we should have a at least a plan to take advantage of that, so please create an issue for it else I don't see why we should have roundabout ways to manage it. As an alternative, what we have talked about is for the requirement script to be able to download newer versions and at release create a pinned requirements listing. Would it make sense in a such requirements list to write |
Looks promising! |
My understanding was that this issue would cover that.
All the PURLs ideally. But matching CVEs against PURLs isn't a straight forward job, talking from experience from previous engagements... 😄
Yea I'm not against having a list of "installable" PURLs and then a sublist of aliases/additional resources which can be used to, for example, discover source code for |
Well, there was nothing there even suggesting that it should be implemented using queries on purls rather than our standard method of subscribing to security notices.
Note, I'm asking for sources to query against so I can evaluate which purls to use before I create specific mappings that are going to replaced, not which purls to query as I assume we want that for everything. And as you have previous experience, I thought you might have some suggestions. 😉
Aight, then I'll move towards this because it make more logical sense to me for the requirements installer, and then we can create a framework for increasing our query coverage with mappings later on. 👍 |
Sorry I misread it. I am not aware of any other sources that can query PURLs directly so we'll likely have to parse and translate.
Yea that sounds good. Let's focus on getting installations properly implemented and figure out security scanning later. Having extras/metadata part of the requirements structure doesn't hurt though. |
Warning
This is a public repository, ensure not to disclose:
What kind of PR is this?
Required: Mark one of the following that is applicable:
Optional: Mark one or more of the following that are applicable:
Important
Breaking changes should be marked
kind/admin-change
orkind/dev-change
depending on typeCritical security fixes should be marked with
kind/security
What does this PR do / why do we need this PR?
This aim to develop a lightweight requirements installer that can be used in a container as well as on workstations, using the current PURL format.
The goal is to be able to serve the tests/Dockerfile with the following types:
As much as possible is to be done in bash alone, debs are always installed first as that may install other package managers, but if needed they are expected to be installed before running the script.
The last type is provided by mapping, which isn't the greatest method, but the one that we kind of already use in the current ansible based approach.
Note that the purl parser does not attempt to be compliant, but tries to be enough for our purposes.
Information to reviewers
Currently I've tested to just run the script against the base requirement file when building a container.
We probably need to have a discussion around the purl types as we are using strange ways to refer to
golang
packages.Logically it does not make sense for us to refer to
golang
packages, as we are not fetchinggolang
packages. It should begithub
packages for a lot of these as we fetch them from their github releases.I'll wait with implementing more mappings until we have discussed this.
Checklist