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

fix(GHSA-5336-2g3f-9g3m): Fixes GSA GHSA-5336-2g3f-9g3m #1442

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

lance
Copy link
Member

@lance lance commented Nov 18, 2022

Changes

GHSA-5336-2g3f-9g3m

The trusted builder prefixes should end with a slash in order to prevent malicious parties from using a builder such as quay.io/bosonhacks/rootkit. Should be cherry-picked to release-1.8

/kind fix

Signed-off-by: Lance Ball lball@redhat.com

Release Note

❗ Fixes: https://github.com/knative/func/security/advisories/GHSA-5336-2g3f-9g3m

Ensures that all trusted builder image prefixes end in a slash so that registry identifiers can't be spoofed with name extensions.

/kind fix

Signed-off-by: Lance Ball <lball@redhat.com>
@knative-prow
Copy link

knative-prow bot commented Nov 18, 2022

@lance: The label(s) kind/fix cannot be applied, because the repository doesn't have them.

In response to this:

Changes

GHSA-5336-2g3f-9g3m

The trusted builder prefixes should end with a slash in order to prevent malicious parties from using a builder such as quay.io/bosonhacks/rootkit. Should be cherry-picked to release-1.8

/kind fix

Signed-off-by: Lance Ball lball@redhat.com

Release Note

❗ Fixes: https://github.com/knative/func/security/advisories/GHSA-5336-2g3f-9g3m

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 18, 2022
@codecov
Copy link

codecov bot commented Nov 18, 2022

Codecov Report

Base: 62.75% // Head: 63.12% // Increases project coverage by +0.37% 🎉

Coverage data is based on head (ca6bbf5) compared to base (6482ba0).
Patch coverage: 25.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1442      +/-   ##
==========================================
+ Coverage   62.75%   63.12%   +0.37%     
==========================================
  Files          74       75       +1     
  Lines       10734    10740       +6     
==========================================
+ Hits         6736     6780      +44     
+ Misses       3438     3401      -37     
+ Partials      560      559       -1     
Flag Coverage Δ
integration-tests 52.73% <25.00%> (+0.03%) ⬆️
unit-tests ?
unit-tests-macos-latest 53.19% <25.00%> (?)
unit-tests-ubuntu-latest 54.60% <25.00%> (?)
unit-tests-windows-latest 53.21% <25.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
buildpacks/builder.go 54.34% <25.00%> (-0.20%) ⬇️
docker/docker_client_nonlinux.go 0.00% <0.00%> (ø)
client.go 62.57% <0.00%> (+0.61%) ⬆️
knative/deployer.go 62.37% <0.00%> (+0.66%) ⬆️
s2i/builder.go 61.33% <0.00%> (+1.33%) ⬆️
docker/creds/credentials.go 73.06% <0.00%> (+1.34%) ⬆️
docker/docker_client.go 84.87% <0.00%> (+23.52%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@andrew-su andrew-su left a comment

Choose a reason for hiding this comment

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

/LGTM

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 18, 2022
@knative-prow
Copy link

knative-prow bot commented Nov 18, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrew-su, lance

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@lance
Copy link
Member Author

lance commented Nov 18, 2022

/override "OnCluster Test / On Cluster Test (1.18.x, ubuntu-latest)"

@knative-prow

This comment was marked as outdated.

@lance
Copy link
Member Author

lance commented Nov 18, 2022

/override "On Cluster Test (1.18.x, ubuntu-latest)"

@knative-prow
Copy link

knative-prow bot commented Nov 18, 2022

@lance: Overrode contexts on behalf of lance: On Cluster Test (1.18.x, ubuntu-latest)

In response to this:

/override "On Cluster Test (1.18.x, ubuntu-latest)"

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow knative-prow bot merged commit e3ce1cf into knative:main Nov 18, 2022
@lance
Copy link
Member Author

lance commented Nov 18, 2022

/cherry-pick release-1.8

@knative-prow-robot
Copy link

@lance: #1442 failed to apply on top of branch "release-1.8":

Applying: fix(GHSA-5336-2g3f-9g3m): Fixes GSA GHSA-5336-2g3f-9g3m
Using index info to reconstruct a base tree...
M	buildpacks/builder.go
Falling back to patching base and 3-way merge...
Auto-merging buildpacks/builder.go
CONFLICT (content): Merge conflict in buildpacks/builder.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix(GHSA-5336-2g3f-9g3m): Fixes GSA GHSA-5336-2g3f-9g3m
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.8

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

lance added a commit to lance/func that referenced this pull request Nov 18, 2022
Ensures that all trusted builder image prefixes end in a slash so that registry identifiers can't be spoofed with name extensions.

/kind fix

Signed-off-by: Lance Ball <lball@redhat.com>
knative-prow bot pushed a commit that referenced this pull request Nov 18, 2022
Ensures that all trusted builder image prefixes end in a slash so that registry identifiers can't be spoofed with name extensions.

/kind fix

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
dsimansk pushed a commit to dsimansk/faas that referenced this pull request Nov 21, 2022
knative#1443)

Ensures that all trusted builder image prefixes end in a slash so that registry identifiers can't be spoofed with name extensions.

/kind fix

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
dsimansk added a commit to openshift-knative/kn-plugin-func that referenced this pull request Nov 21, 2022
* [release-1.8] techdebt(buildpacks): test builder image prefix (knative#1441)

* techdebt(buildpacks): test builder image prefix

Adds a test for the known builder image prefixes, ensuring they are considered trusted. Removes the check for old versions of podman in order to facilitate this test without turning it into an integration test. Podman 3.4 was released in the summer of '21, more than a year ago, and all published versions of RHEL ship with podman 4.2.

/kind techdebt

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: remove unused code

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: run ./hack/update-codegen.sh

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: run ./hack/update-codegen.sh

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
Co-authored-by: Lance Ball <lball@redhat.com>

* fix(GHSA-5336-2g3f-9g3m): Fixes GSA GHSA-5336-2g3f-9g3m (knative#1442) (knative#1443)

Ensures that all trusted builder image prefixes end in a slash so that registry identifiers can't be spoofed with name extensions.

/kind fix

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
Co-authored-by: Knative Prow Robot <knative-prow-robot@google.com>
Co-authored-by: Lance Ball <lball@redhat.com>
knative-prow bot pushed a commit that referenced this pull request Dec 13, 2022
* fix(GHSA-5336-2g3f-9g3m): Fixes GSA GHSA-5336-2g3f-9g3m (#1442)

Ensures that all trusted builder image prefixes end in a slash so that registry identifiers can't be spoofed with name extensions.

/kind fix

Signed-off-by: Lance Ball <lball@redhat.com>

* fix: make socat image public and remove socat image env (#1384)

* chore: verbose version to display image ref

Signed-off-by: Lance Ball <lball@redhat.com>
Co-authored-by: Jefferson Ramos <jeramos@redhat.com>
lance added a commit to lance/func that referenced this pull request Feb 15, 2023
Ensures that all trusted builder image prefixes end in a slash so that registry identifiers can't be spoofed with name extensions.

/kind fix

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants