Skip to content

Commit 8ce2809

Browse files
authored
Merge branch 'master' into step-security-bot/stepsecurity_remediation_1737672664
2 parents 13605b2 + 917f4d0 commit 8ce2809

File tree

5 files changed

+135
-14
lines changed

5 files changed

+135
-14
lines changed

.github/workflows/ci-cd.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,8 @@ jobs:
519519

520520
steps:
521521
- name: Decide whether the needed jobs succeeded or failed
522-
uses: re-actors/alls-green@release/v1
522+
# yamllint disable-line rule:line-length
523+
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1
523524
with:
524525
jobs: ${{ toJSON(needs) }}
525526

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
3+
# Dependency Review Action
4+
#
5+
# This Action will scan dependency manifest files that change as part of a
6+
# Pull Request, surfacing known-vulnerable versions of the packages declared
7+
# or updated in the PR.
8+
# Once installed, if the workflow run is marked as required,
9+
# PRs introducing known-vulnerable packages will be blocked from merging.
10+
#
11+
# Source repository: https://github.com/actions/dependency-review-action
12+
name: Dependency Review
13+
14+
on:
15+
pull_request:
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
dependency-review:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout Repository
25+
# yamllint disable-line rule:line-length
26+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
- name: Dependency Review
28+
# yamllint disable-line rule:line-length
29+
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0

.github/workflows/reusable-tox.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ jobs:
173173
- name: Retrieve the project source from an sdist inside the GHA artifact
174174
if: >-
175175
!contains(fromJSON('["pre-commit", "spellcheck-docs"]'), inputs.toxenv)
176-
uses: re-actors/checkout-python-sdist@release/v2
176+
# yamllint disable-line rule:line-length
177+
uses: re-actors/checkout-python-sdist@187f55296b0f54d88259aaaf99af32ad3647d3bc # release/v2
177178
with:
178179
source-tarball-name: ${{ inputs.source-tarball-name }}
179180
workflow-artifact-name: ${{ inputs.dists-artifact-name }}

.github/workflows/scorecards.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
# This workflow uses actions that are not certified by GitHub. They are
3+
# provided by a third-party and are governed by separate terms of service,
4+
# privacy policy, and support documentation.
5+
6+
name: Scorecard supply-chain security
7+
on:
8+
# For Branch-Protection check. Only the default branch is supported. See
9+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
10+
branch_protection_rule:
11+
# To guarantee Maintained check is occasionally updated. See
12+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
13+
schedule:
14+
- cron: 20 7 * * 2
15+
push:
16+
branches:
17+
- master
18+
19+
# Declare default permissions as read only.
20+
permissions: read-all
21+
22+
jobs:
23+
analysis:
24+
name: Scorecard analysis
25+
runs-on: ubuntu-latest
26+
permissions:
27+
# Needed to upload the results to code-scanning dashboard.
28+
security-events: write
29+
# Needed to publish results and get a badge (see publish_results below).
30+
id-token: write
31+
contents: read
32+
actions: read
33+
# To allow GraphQL ListCommits to work
34+
issues: read
35+
pull-requests: read
36+
# To detect SAST tools
37+
checks: read
38+
39+
steps:
40+
- name: Checkout code
41+
# yamllint disable-line rule:line-length
42+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43+
with:
44+
persist-credentials: false
45+
46+
- name: Run analysis
47+
# yamllint disable-line rule:line-length
48+
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
49+
with:
50+
results_file: results.sarif
51+
results_format: sarif
52+
# (Optional) "write" PAT token. Uncomment the `repo_token` line if:
53+
# - you want to enable the Branch-Protection check on a *public*
54+
# repository, or
55+
# - you are installing Scorecards on a *private* repository
56+
# To create the PAT, follow the steps in
57+
# https://github.com/ossf/scorecard-action#authentication-with-pat.
58+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
59+
60+
# Public repositories:
61+
# - Publish results to OpenSSF REST API for easy access by consumers
62+
# - Allows the repository to include the Scorecard badge.
63+
# - See https://github.com/ossf/scorecard-action#publishing-results.
64+
# For private repositories:
65+
# - `publish_results` will always be set to `false`, regardless
66+
# of the value entered here.
67+
publish_results: true
68+
69+
# Upload the results as artifacts (optional). Commenting out will disable
70+
# uploads of run results in SARIF format to the repository Actions tab.
71+
- name: Upload artifact
72+
# yamllint disable-line rule:line-length
73+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
74+
with:
75+
name: SARIF file
76+
path: results.sarif
77+
retention-days: 5
78+
79+
# Upload the results to GitHub's code scanning dashboard.
80+
- name: Upload to code-scanning
81+
# yamllint disable-line rule:line-length
82+
uses: github/codeql-action/upload-sarif@ee117c905ab18f32fa0f66c2fe40ecc8013f3e04 # v3.28.4
83+
with:
84+
sarif_file: results.sarif

.pre-commit-config.yaml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,22 @@ repos:
3232
- id: mixed-line-ending
3333
args: [--fix=lf]
3434

35+
# Non-modifying checks:
36+
- id: name-tests-test
37+
files: >-
38+
^tests/[^_].*\.py$
39+
3540
# Security
3641
- id: detect-aws-credentials
3742
args:
3843
- --allow-missing-credentials
3944
- id: detect-private-key
4045

41-
# Non-modifying checks:
42-
- id: name-tests-test
43-
files: >-
44-
^tests/[^_].*\.py$
46+
# Detect hardcoded secrets
47+
- repo: https://github.com/gitleaks/gitleaks
48+
rev: v8.16.3
49+
hooks:
50+
- id: gitleaks
4551

4652
- repo: https://github.com/adrienverge/yamllint.git
4753
rev: v1.35.1
@@ -53,6 +59,14 @@ repos:
5359
args:
5460
- --strict
5561

62+
# JSON5 Linter
63+
- repo: https://github.com/pre-commit/mirrors-prettier
64+
rev: v3.1.0
65+
hooks:
66+
- id: prettier
67+
# https://prettier.io/docs/en/options.html#parser
68+
files: .json5$
69+
5670
- repo: https://github.com/pre-commit/mirrors-mypy.git
5771
rev: v1.14.1
5872
hooks:
@@ -135,11 +149,3 @@ repos:
135149
- --ignore=SC1091 # Useless check
136150
- --ignore=SC2015 # Useless check
137151
- --ignore=SC3037 # Not related to alpine
138-
139-
# JSON5 Linter
140-
- repo: https://github.com/pre-commit/mirrors-prettier
141-
rev: v3.1.0
142-
hooks:
143-
- id: prettier
144-
# https://prettier.io/docs/en/options.html#parser
145-
files: .json5$

0 commit comments

Comments
 (0)