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/container-scanning): Integrate container and cve scanning post … #10272

Merged
merged 3 commits into from
Feb 10, 2023

Conversation

saisatishkarra
Copy link
Contributor

…publishing

Summary

  • Integrate container and CVE scanning after publishing to registry
  • Support container scanning for statically defined amd64 / arm64 platforms
  • Use Syft for generating SBOMS for container
  • Use Grype for CVE scanning
  • Uploads the scan assets (SBOM, CVE report) as workflow assets

Expected outcome

  • Visibility into packages and licenses within container images
  • Visibility into CVE's for AMD and ARM platforms

Checklist

Full changelog

  • [Implement ...]

Issue reference

Fix #[issue number]

@github-actions github-actions bot added the chore Not part of the core functionality of kong, but still needed label Feb 9, 2023
@saisatishkarra saisatishkarra force-pushed the build/ENGEN-844 branch 2 times, most recently from 3cd264d to 1d458fc Compare February 9, 2023 17:43
@CLAassistant
Copy link

CLAassistant commented Feb 9, 2023

CLA assistant check
All committers have signed the CLA.

@curiositycasualty curiositycasualty temporarily deployed to release February 9, 2023 21:22 — with GitHub Actions Inactive
@curiositycasualty curiositycasualty temporarily deployed to release February 9, 2023 21:22 — with GitHub Actions Inactive
@curiositycasualty curiositycasualty temporarily deployed to release February 9, 2023 21:22 — with GitHub Actions Inactive
@curiositycasualty curiositycasualty temporarily deployed to release February 9, 2023 21:22 — with GitHub Actions Inactive
@curiositycasualty curiositycasualty temporarily deployed to release February 9, 2023 21:22 — with GitHub Actions Inactive
@curiositycasualty curiositycasualty temporarily deployed to release February 9, 2023 21:22 — with GitHub Actions Inactive
@curiositycasualty curiositycasualty temporarily deployed to release February 9, 2023 21:22 — with GitHub Actions Inactive
@curiositycasualty curiositycasualty temporarily deployed to release February 9, 2023 21:22 — with GitHub Actions Inactive
@curiositycasualty curiositycasualty temporarily deployed to release February 9, 2023 21:22 — with GitHub Actions Inactive
@curiositycasualty curiositycasualty temporarily deployed to release February 9, 2023 21:22 — with GitHub Actions Inactive
@curiositycasualty curiositycasualty temporarily deployed to release February 9, 2023 21:22 — with GitHub Actions Inactive
@curiositycasualty curiositycasualty temporarily deployed to release February 9, 2023 21:22 — with GitHub Actions Inactive
Copy link
Contributor

@curiositycasualty curiositycasualty left a comment

Choose a reason for hiding this comment

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

Overall this looks good. I've penned up some minor improvements in #10273

@pull-request-size pull-request-size bot added size/L and removed size/M labels Feb 9, 2023
saisatishkarra and others added 2 commits February 9, 2023 14:41
* chore(gha): cleanup trailing whitespace

* chore(gha): simplify release scan image as ENV

* chore(gha): simplify release scan logic

* fix(gha): release scan IMAGE context
@saisatishkarra saisatishkarra merged commit d9bdd82 into master Feb 10, 2023
@saisatishkarra saisatishkarra deleted the build/ENGEN-844 branch February 10, 2023 00:39
@mashapedeployment
Copy link
Contributor

The backport to release/2.8.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/2.8.x release/2.8.x
# Navigate to the new working tree
cd .worktrees/backport-release/2.8.x
# Create a new branch
git switch --create backport-10272-to-release/2.8.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d9bdd828f92c25c50e5d39d6d53a2fbac443771c
# Push it to GitHub
git push --set-upstream origin backport-10272-to-release/2.8.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/2.8.x

Then, create a pull request where the base branch is release/2.8.x and the compare/head branch is backport-10272-to-release/2.8.x.

@mashapedeployment
Copy link
Contributor

The backport to release/3.1.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.1.x release/3.1.x
# Navigate to the new working tree
cd .worktrees/backport-release/3.1.x
# Create a new branch
git switch --create backport-10272-to-release/3.1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d9bdd828f92c25c50e5d39d6d53a2fbac443771c
# Push it to GitHub
git push --set-upstream origin backport-10272-to-release/3.1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.1.x

Then, create a pull request where the base branch is release/3.1.x and the compare/head branch is backport-10272-to-release/3.1.x.

@mashapedeployment
Copy link
Contributor

The backport to release/3.2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.2.x release/3.2.x
# Navigate to the new working tree
cd .worktrees/backport-release/3.2.x
# Create a new branch
git switch --create backport-10272-to-release/3.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d9bdd828f92c25c50e5d39d6d53a2fbac443771c
# Push it to GitHub
git push --set-upstream origin backport-10272-to-release/3.2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.2.x

Then, create a pull request where the base branch is release/3.2.x and the compare/head branch is backport-10272-to-release/3.2.x.

saisatishkarra added a commit that referenced this pull request Feb 10, 2023
#10272)

* (feat/container-scanning): Integrate container and cve scanning post publishing

* build/ENGEN-844 review (#10273)

* chore(gha): cleanup trailing whitespace

* chore(gha): simplify release scan image as ENV

* chore(gha): simplify release scan logic

* fix(gha): release scan IMAGE context

* chore(gha): fix scan manifest output redirection

---------

Co-authored-by: Isa Farnik <isa@konghq.com>
@fffonion
Copy link
Contributor

@saisatishkarra I just realized I left comment only on the backport PR on release/3.2.x branch and didn't
see this one. This PR needs some adjustment, please see my comment at the EE PR.

fffonion pushed a commit that referenced this pull request Feb 23, 2023
Backported from #10272 

* (feat/container-scanning): Integrate container and cve scanning post … (#10272)

* (feat/container-scanning): Integrate container and cve scanning post publishing

* build/ENGEN-844 review (#10273)

* chore(gha): cleanup trailing whitespace

* chore(gha): simplify release scan image as ENV

* chore(gha): simplify release scan logic

* fix(gha): release scan IMAGE context

* chore(gha): fix scan manifest output redirection

---------

Co-authored-by: Isa Farnik <isa@konghq.com>

* fix(cd): remove container scan dependency

---------

Co-authored-by: Isa Farnik <isa@konghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Not part of the core functionality of kong, but still needed size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants