Skip to content

General Tool Upgrade - #395

Merged
perrito666 merged 20 commits into
masterfrom
horacio/update_scan_tooling
Aug 28, 2023
Merged

General Tool Upgrade#395
perrito666 merged 20 commits into
masterfrom
horacio/update_scan_tooling

Conversation

@perrito666

@perrito666 perrito666 commented Aug 25, 2023

Copy link
Copy Markdown
Contributor
  • Tools that are used for scanning were upgraded to latest version available
  • Ubuntu version used for all processes, including docker images were upgraded to 22.04, latest LTS without excessive use of snap.
  • arm64/amd64 scripts were clearly defined and we tried to avoid repetition where possible.
  • Python in use is 3.10 now

This was so far tested only with checkov.
AppImage still needs some work to be fully reliable.

* Tools that are used for scanning were upgraded to latest version available
* Ubuntu version used for all processes, including docker images were upgraded to 22.04, latest LTS without excessive use of snap.
* arm64/amd64 scripts were clearly defined and we tried to avoid repetition where possible.

This was so far tested only with checkov.
AppImage still needs some work to be fully reliable.
@perrito666
perrito666 requested review from Ferada and gacevedo August 25, 2023 07:08

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Scan Summary

Tool Critical High Medium Low Status
Python Security Analysis 0 0 0 0
Secrets Audit 0 0 0 0
Shell Script Analysis 0 0 0 0
Python Source Analyzer 0 0 0 0
Security Audit for Infrastructure 0 2 0 6

Recommendation

Looks good ✔️

Comment thread Dockerfile
COPY tools_config/ /usr/local/src/

FROM shiftleft/scan-base-slim as sast-scan-tools
USER root

Check failure

Code scanning / Security Audit for Infrastructure

Ensure the last USER is not root.

Ensure the last USER is not root.
Comment thread Dockerfile
@@ -1,96 +1,81 @@
FROM shiftleft/scan-base as builder
FROM ubuntu:jammy as scan-base

Check notice

Code scanning / Security Audit for Infrastructure

Ensure that HEALTHCHECK instructions have been added to container images.

Ensure that HEALTHCHECK instructions have been added to container images.
@@ -1,4 +1,6 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

Check notice

Code scanning / Security Audit for Infrastructure

Ensure that a user for the container has been created.

Ensure that a user for the container has been created.
@@ -1,4 +1,6 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

Check notice

Code scanning / Security Audit for Infrastructure

Ensure that HEALTHCHECK instructions have been added to container images.

Ensure that HEALTHCHECK instructions have been added to container images.
Comment thread builder.Dockerfile
@@ -1,7 +1,8 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

Check notice

Code scanning / Security Audit for Infrastructure

Ensure that a user for the container has been created.

Ensure that a user for the container has been created.
Comment thread builder.Dockerfile
@@ -1,7 +1,8 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

Check notice

Code scanning / Security Audit for Infrastructure

Ensure that HEALTHCHECK instructions have been added to container images.

Ensure that HEALTHCHECK instructions have been added to container images.
Make actions use the same build script as everything else.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Scan Summary

Tool Critical High Medium Low Status
Shell Script Analysis 0 0 0 0
Secrets Audit 0 54 0 0
Python Source Analyzer 0 0 0 0
Python Security Analysis 0 0 0 0
Security Audit for Infrastructure 0 2 0 6

Recommendation

Please review the findings from Code scanning alerts before approving this pull request. You can also configure the build rules or add suppressions to customize this bot 👍

For now we will use the scan-reports repository but we will eventually update the pypi package

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Scan Summary

Tool Critical High Medium Low Status
Shell Script Analysis 0 0 0 0
Secrets Audit 0 0 0 0
Python Source Analyzer 0 0 0 0
Python Security Analysis 0 0 0 0
Security Audit for Infrastructure 0 2 0 6

Recommendation

Looks good ✔️

While PR is accepted in upstream
For some reason github actions are picking an older one.
There were leftover hardcoded architectures in the build script
A portion of code using the wrong python module was replaced for one equivalent.
Icons need to be renamed for AppImage builder to find them. It is unclear if we should change the icon name in the configuration.

@Ferada Ferada left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks i hate it

Comment thread .github/workflows/pythonapp.yml
Comment thread .github/workflows/pythonapp.yml
Comment thread Dockerfile Outdated
Comment thread appimage-builder-arm64.yml
Comment thread appimage-builder.yml Outdated
Comment thread appimage-reqs.sh Outdated
Comment thread appimage-reqs.sh Outdated
Comment thread appimage-reqs.sh Outdated
Comment thread requirements.txt Outdated
Comment thread ubuntu_build.sh Outdated
perrito666 and others added 3 commits August 25, 2023 18:44
My changes have been merged
Olof had some formatting suggestions (and corrected typos)

Co-authored-by: Olof-Joachim Frahm (欧雅福) <olof@shiftleft.io>
perrito666 and others added 4 commits August 25, 2023 18:48
Co-authored-by: Olof-Joachim Frahm (欧雅福) <olof@shiftleft.io>
Try to force AppImage to have all its needs

Appimage, until this patch at least, lacks urllib3 despite it being an explicit requirement.
Ensure we do not install recommends on build
@perrito666
perrito666 marked this pull request as ready for review August 28, 2023 10:26
@perrito666
perrito666 merged commit 6d76d08 into master Aug 28, 2023
@delete-merged-branch
delete-merged-branch Bot deleted the horacio/update_scan_tooling branch August 28, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants