Skip to content

feat: add Dockerfile analysis for build command detection #1091

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

Draft
wants to merge 36 commits into
base: staging
Choose a base branch
from

Conversation

achrafmag
Copy link
Member

Summary

Description of changes

-Function find_dockerfile_from_job: handles finding Dockerfile inside workflow in 2 cases of workflow jobs: -run and -uses.

-Simple DockerNode class, so far it stores mainly the dockerfile path retrieved from workflow

-Parsing Dockerfile using dockerfile-parse and RUN instruction commands using bashparser.py

Related issues

Draft Pull Request, does not target any particular issue

Checklist

  • I have reviewed the contribution guide.
  • My PR title and commits follow the Conventional Commits convention.
  • My commits include the "Signed-off-by" line.
  • I have signed my commits following the instructions provided by GitHub. Note that we run GitHub's commit verification tool to check the commit signatures. A green verified label should appear next to all of your commits on GitHub.
  • I have updated the relevant documentation, if applicable.
  • I have tested my changes and verified they work as expected.

art1f1c3R and others added 21 commits April 9, 2025 16:26
…PyPI malware reporting (oracle#1031)

Resolved issue in ProbLog model where skip results were evaluated as false, causing many false positives. Rule IDs have also been added.

Signed-off-by: Carl Flottmann <[email protected]>
…tory (oracle#982)

This PR adds a fallback option for PyPI PURLs in cases where deps.dev does not report their repositories. Instead, the PyPI registry is used to find the appropriate repository URL.

Signed-off-by: Ben Selwyn-Smith <[email protected]>
This pull request introduces a new check mcn_githubactions_vulnerabilities_1 to detect vulnerable GitHub Actions, enhancing the security of workflows and automating the identification of potential risks in CI/CD pipelines. 

Signed-off-by: behnazh-w <[email protected]>
Refactor logging behavior to print the SLSA summary only when verbose mode is enabled. We can revisit if the summary should be removed or improved in the verbose mode in the future.

Signed-off-by: behnazh-w <[email protected]>
This PR adds a utility function to identify the highest semantic version tag from a set of Git tags, specifically for cases where multiple tags point to the same commit SHA in a third-party GitHub Action. 

Signed-off-by: behnazh-w <[email protected]>
Automatically generated by Commitizen.
This PR adds discovery of PyPI attestation files for software components.

Signed-off-by: Ben Selwyn-Smith <[email protected]>
add support for Semgrep in the final macaron docker build using multistage docker builds.

Signed-off-by: Carl Flottmann <[email protected]>
Changes:

-Function find_dockerfile_from_job: handles finding Dockerfile inside workflow in 2 cases of workflow jobs: -run and -uses.

-Simple DockerNode class, so far it stores mainly the dockerfile path retrieved from workflow

-Parsing Dockerfile using dockerfile-parse and RUN instruction commands using bashparser.py

Signed-off-by: Achraf Maghous <[email protected]>
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 22, 2025
@behnazh-w behnazh-w marked this pull request as draft May 22, 2025 23:55
@behnazh-w behnazh-w changed the title chore: creating DockerNode for when Dockerfile is used as a build tool feat: add Dockerfile analysis for build command detection May 22, 2025
achrafmag added 3 commits May 23, 2025 10:22
Changes:

-Function find_dockerfile_from_job: handles finding Dockerfile inside workflow in 2 cases of workflow jobs: -run and -uses.

-Simple DockerNode class, so far it stores mainly the dockerfile path retrieved from workflow

-Parsing Dockerfile using dockerfile-parse and RUN instruction commands using bashparser.py

Signed-off-by: Achraf Maghous <[email protected]>
Changes:

-Function find_dockerfile_from_job: handles finding Dockerfile inside workflow in 2 cases of workflow jobs: -run and -uses.

-Simple DockerNode class, so far it stores mainly the dockerfile path retrieved from workflow

-Parsing Dockerfile using dockerfile-parse and RUN instruction commands using bashparser.py

Signed-off-by: Achraf Maghous <[email protected]>
Changes:

-Function find_dockerfile_from_job: handles finding Dockerfile inside workflow in 2 cases of workflow jobs: -run and -uses.

-Simple DockerNode class, so far it stores mainly the dockerfile path retrieved from workflow

-Parsing Dockerfile using dockerfile-parse and RUN instruction commands using bashparser.py

Signed-off-by: Achraf Maghous <[email protected]>
benmss and others added 11 commits May 29, 2025 15:19
…ackages (oracle#965)

Include support for using Semgrep for analysis of source code to detect malicious code patterns, specified using Semgrep's YAML files.

Signed-off-by: Carl Flottmann <[email protected]>
This PR allows Macaron to discover GitHub attestation. To retrieve these attestations, the SHA256 hash of the related artefact is required. Hashes are computed from local artefact files if available, or from downloaded ones otherwise.

Signed-off-by: Ben Selwyn-Smith <[email protected]>
…acle#1096)

This PR replaces the Go shared library previously used via C-bindings in Python with a standalone binary for the cuevalidator component. The binary can now be invoked as a subprocess, simplifying integration and improving portability.

Signed-off-by: behnazh-w <[email protected]>
Changes:

-Function find_dockerfile_from_job: handles finding Dockerfile inside workflow in 2 cases of workflow jobs: -run and -uses.

-Simple DockerNode class, so far it stores mainly the dockerfile path retrieved from workflow

-Parsing Dockerfile using dockerfile-parse and RUN instruction commands using bashparser.py

-Parsing and storing build commands found in Dockerfiles

Signed-off-by: Achraf Maghous <[email protected]>
…e. (oracle#1102)

The detail info containing inspector links now contains links as keys regardless of whether they are reachable, and includes a boolean value for reachability.

Signed-off-by: Carl Flottmann <[email protected]>
--analyze-source CLI arg removed so Semgrep is now run by default. Automatic API docs update also run.

Signed-off-by: Carl Flottmann <[email protected]>
Changes:

-Function find_dockerfile_from_job: handles finding Dockerfile inside workflow in 2 cases of workflow jobs: -run and -uses.

-Simple DockerNode class, so far it stores mainly the dockerfile path retrieved from workflow

-Parsing Dockerfile using dockerfile-parse and RUN instruction commands using bashparser.py

-Parsing and storing build commands found in Dockerfiles

Signed-off-by: Achraf Maghous <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants