Skip to content

Commit bfdeb62

Browse files
authored
feat: add a workflow to run Macaron for supply chain security detection (#1099)
1 parent e3e2e58 commit bfdeb62

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Run Macaron's policies and generate Verification Summary Attestation reports.
2+
# See https://github.com/oracle/macaron
3+
4+
name: Run Macaron to check supply chain security issues
5+
on:
6+
push:
7+
branches:
8+
- main
9+
paths:
10+
- .github/workflows/**
11+
pull_request:
12+
paths:
13+
- .github/workflows/**
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
run_macaron:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
24+
- name: Check out repository
25+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
26+
with:
27+
fetch-depth: 0
28+
29+
# Check the GitHub Actions workflows in the repository for vulnerabilities.
30+
- name: Run Macaron action
31+
uses: oracle/macaron@b31acfe389133a5587d9639063ec70cb84e7bc47 # v0.23.0
32+
with:
33+
repo_path: ./
34+
policy_file: check-github-actions
35+
policy_purl: pkg:github.com/jenstroeger/python-package-template@.*
36+
reports_retention_days: 90

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Automatic package versioning and tagging, publishing to [PyPI](https://pypi.org/
6060

6161
[OSSF Security Scorecards](https://github.com/ossf/scorecard) is enabled as a GitHub Actions workflow to give the consumers information about the supply-chain security posture of this project, assigning a score of 0–10. We upload the results as a SARIF (Static Analysis Results Interchange Format) artifact after each run and the results can be found at the Security tab of this GitHub project. We also allow publishing the data at [OpenSSF](https://metrics.openssf.org/). We use this data to continuously improve the security posture of this project. Note that this configuration supports the ``main`` (default) branch and requires the repository to be public and not forked.
6262

63+
[Macaron](https://oracle.github.io/macaron/pages/macaron_action.html) is enabled as a GitHub Actions workflow for supply chain security detection. It runs the `check-github-actions` policy to analyze GitHub workflows for insecure patterns and potential risks. When issues are detected, detailed findings and remediation suggestions are included in the workflow summary. Full reports are also uploaded as workflow artifacts for further review.
64+
6365
[pip-audit](https://github.com/pypa/pip-audit) is part of the default Python virtual environment, and can be used to check all installed packages for documented [CVE](https://www.cve.org/) by querying the [Python Packaging Advisory Database](https://github.com/pypa/advisory-database). The `_build.yaml` workflow always runs a package audit before the artifacts are being built. In automated production environments it _may_, on rare occasions, be necessary to suspend package auditing in which case you can [add a repository variable](https://docs.github.com/en/actions/learn-github-actions/variables#creating-configuration-variables-for-a-repository) `DISABLE_PIP_AUDIT` with value `true` to your repository to explicitly disable running pip-audit.
6466

6567
### Package or application?

0 commit comments

Comments
 (0)