reliabot 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- .github/CODEOWNERS +7 -0
- .github/ISSUE_TEMPLATE/enhancement.md +30 -0
- .github/ISSUE_TEMPLATE/problem.md +49 -0
- .github/ISSUE_TEMPLATE/question.md +24 -0
- .github/dependabot.yml +39 -0
- .github/repository-rules/reliabot-default-branch-rules.json +73 -0
- .github/workflows/assign-labels.yaml +75 -0
- .github/workflows/codacy-coverage-reporter.yaml +58 -0
- .github/workflows/codeql.yaml +71 -0
- .github/workflows/dependency-review.yaml +37 -0
- .github/workflows/ossf-scorecard.yaml +74 -0
- .github/workflows/publish.yaml +228 -0
- .github/workflows/python-app.yaml +289 -0
- .github/workflows/stale.yaml +48 -0
- .pre-commit-config.yaml +414 -0
- .pre-commit-hooks.yaml +40 -0
- reliabot/__init__.py +3 -0
- reliabot/reliabot.py +1404 -0
- reliabot/requirements.txt +1 -0
- reliabot-0.4.0.dist-info/METADATA +509 -0
- reliabot-0.4.0.dist-info/RECORD +48 -0
- reliabot-0.4.0.dist-info/WHEEL +4 -0
- reliabot-0.4.0.dist-info/entry_points.txt +3 -0
- reliabot-0.4.0.dist-info/licenses/LICENSE +19 -0
- testdir/badlink/.github/.gitignore +1 -0
- testdir/badlink/versions.tf +0 -0
- testdir/configured/.github/dependabot.yml +21 -0
- testdir/configured/.github/workflows/lint.yaml +33 -0
- testdir/configured/bundler/Gemfile +0 -0
- testdir/configured/cargo/cargo.toml +0 -0
- testdir/configured/composer/composer.json +0 -0
- testdir/configured/docker/Dockerfile +0 -0
- testdir/configured/elm/elm-package.json +0 -0
- testdir/configured/github-actions/action.yml +0 -0
- testdir/configured/gitsubmodule/.gitmodules +0 -0
- testdir/configured/gomod/go.mod +0 -0
- testdir/configured/gradle/build.gradle +0 -0
- testdir/configured/hex/mix.exs +0 -0
- testdir/configured/maven/pom.xml +0 -0
- testdir/configured/npm/package.json +1 -0
- testdir/configured/nuget/nuget.config +0 -0
- testdir/configured/pip/requirements.txt +1 -0
- testdir/configured/pub/pubspec.yaml +0 -0
- testdir/configured/terraform/versions.tf +0 -0
- testdir/github/.github/CODEOWNERS +0 -0
- testdir/github/.gitignore +1 -0
- testdir/github/action.yml +20 -0
- testdir/not-dir +0 -0
.github/CODEOWNERS
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Enhancement
|
|
3
|
+
about: Suggest an enhancement to Reliabot
|
|
4
|
+
title: Enhancement to …
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
> Before suggesting an enhancement, search for similar issues: \
|
|
10
|
+
> https://github.com/dupuy/reliabot/issues?q=is%3Aissue+sort%3Acomments-desc
|
|
11
|
+
|
|
12
|
+
> If you find one, please add a comment in that issue. For more help, see \
|
|
13
|
+
> https://github.com/dupuy/reliabot/blob/main/CONTRIBUTING.md#suggesting-enhancements.
|
|
14
|
+
|
|
15
|
+
## _If the enhancement is:_ Related to a problem
|
|
16
|
+
|
|
17
|
+
_Explain the problem you're having, such as "it's frustrating when …" and how
|
|
18
|
+
this enhancement would help._
|
|
19
|
+
|
|
20
|
+
## Describe the solution you want to see
|
|
21
|
+
|
|
22
|
+
_Explain how you want Reliabot to work, providing as many details as possible._
|
|
23
|
+
|
|
24
|
+
## Outline alternatives you've considered
|
|
25
|
+
|
|
26
|
+
_Summarize any alternatives, and explain why they aren't as good._
|
|
27
|
+
|
|
28
|
+
## Provide a rationale
|
|
29
|
+
|
|
30
|
+
_Explain why this enhancement would be useful to many reliabot users._
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Problem
|
|
3
|
+
about: Report a problem you have with Reliabot
|
|
4
|
+
title: Problem with …
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
> Before reporting a problem, search for similar issues: \
|
|
10
|
+
> https://github.com/dupuy/reliabot/issues?q=is%3Aissue+sort%3Acomments-desc
|
|
11
|
+
|
|
12
|
+
> If you find one, please add a comment in that issue. For more help, see \
|
|
13
|
+
> https://github.com/dupuy/reliabot/blob/main/CONTRIBUTING.md#reporting-problems.
|
|
14
|
+
|
|
15
|
+
> ⚠️**Don't report security related issues or vulnerabilities here**. See \
|
|
16
|
+
> https://github.com/dupuy/reliabot/security/policy for secure reporting.
|
|
17
|
+
|
|
18
|
+
## Describe the problem
|
|
19
|
+
|
|
20
|
+
_Briefly describe the expected behavior and Reliabot's actual behavior._
|
|
21
|
+
|
|
22
|
+
## How you can reproduce the problem
|
|
23
|
+
|
|
24
|
+
_Outline the steps to show the problem you are having._
|
|
25
|
+
|
|
26
|
+
1. Set `PYTHONWARNINGS=default` in your environment
|
|
27
|
+
|
|
28
|
+
2. _Provide the Reliabot command line (or `pre-commit run -v reliabot`) output,
|
|
29
|
+
including all warnings, error messages, and stack traces._
|
|
30
|
+
|
|
31
|
+
3. _Attach `.pre-commit-config.yml`, `dependabot.yml`, and `.gitignore` files._
|
|
32
|
+
|
|
33
|
+
4. _Link to a public GitHub repository or provide `tree` or `ls -R` output._
|
|
34
|
+
|
|
35
|
+
## Screenshots
|
|
36
|
+
|
|
37
|
+
_If applicable, add screenshots to help explain your problem._
|
|
38
|
+
|
|
39
|
+
## Context
|
|
40
|
+
|
|
41
|
+
_Add any other context about the problem here._
|
|
42
|
+
|
|
43
|
+
- Reliabot version
|
|
44
|
+
|
|
45
|
+
- Python version
|
|
46
|
+
|
|
47
|
+
- Operating system (distribution) version
|
|
48
|
+
|
|
49
|
+
- Output from `reliabot.py --self-test` (if relevant)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Question
|
|
3
|
+
about: Ask a question about Reliabot
|
|
4
|
+
title: Question about …
|
|
5
|
+
labels: question
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
> Before asking a question, search for similar issues: \
|
|
10
|
+
> https://github.com/dupuy/reliabot/issues?q=is%3Aissue+sort%3Acomments-desc
|
|
11
|
+
|
|
12
|
+
> If you find one, but still need help, ask your question in that issue. A few
|
|
13
|
+
> internet searches may turn up an answer. For help asking questions, see \
|
|
14
|
+
> https://github.com/dupuy/reliabot/blob/main/CONTRIBUTING.md#asking-a-question.
|
|
15
|
+
|
|
16
|
+
_Provide as much context as you can for your question._
|
|
17
|
+
|
|
18
|
+
- Reliabot version
|
|
19
|
+
|
|
20
|
+
- Whether you're running Reliabot with pre-commit or on the command line
|
|
21
|
+
|
|
22
|
+
- Operating System (distribution) and Python versions
|
|
23
|
+
|
|
24
|
+
_Explain what you're trying to do, and what you don't understand._
|
.github/dependabot.yml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
# reliabot: mapping=2 offset=2 sequence=4
|
|
3
|
+
# reliabot: keep=. # this is mostly for test coverage (as is ./ in next)
|
|
4
|
+
# reliabot: ignore=./reliabot # already tracked in repository root
|
|
5
|
+
# reliabot: ignore=testdir/
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- directory: /
|
|
9
|
+
package-ecosystem: pip
|
|
10
|
+
schedule:
|
|
11
|
+
interval: monthly
|
|
12
|
+
groups:
|
|
13
|
+
python-tools:
|
|
14
|
+
- ruff
|
|
15
|
+
- tox
|
|
16
|
+
- directory: /
|
|
17
|
+
package-ecosystem: github-actions
|
|
18
|
+
schedule:
|
|
19
|
+
interval: monthly
|
|
20
|
+
groups:
|
|
21
|
+
gh-actions-infrastructure:
|
|
22
|
+
patterns:
|
|
23
|
+
- actions/*
|
|
24
|
+
- github/*
|
|
25
|
+
- ossf/*
|
|
26
|
+
- step-security/*
|
|
27
|
+
gh-actions-releases:
|
|
28
|
+
patterns:
|
|
29
|
+
- ncipollo/release-action
|
|
30
|
+
- orhun/git-cliff-action
|
|
31
|
+
- pypa/*
|
|
32
|
+
- directory: /fuzz
|
|
33
|
+
package-ecosystem: docker
|
|
34
|
+
schedule:
|
|
35
|
+
interval: monthly
|
|
36
|
+
- directory: /fuzz
|
|
37
|
+
package-ecosystem: pip
|
|
38
|
+
schedule:
|
|
39
|
+
interval: monthly
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": 12895965,
|
|
3
|
+
"name": "reliabot-default-branch-rules",
|
|
4
|
+
"target": "branch",
|
|
5
|
+
"source_type": "Repository",
|
|
6
|
+
"source": "dupuy/reliabot",
|
|
7
|
+
"enforcement": "active",
|
|
8
|
+
"conditions": {
|
|
9
|
+
"ref_name": {
|
|
10
|
+
"exclude": [],
|
|
11
|
+
"include": ["~DEFAULT_BRANCH"]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"rules": [
|
|
15
|
+
{
|
|
16
|
+
"type": "deletion"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "non_fast_forward"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "pull_request",
|
|
23
|
+
"parameters": {
|
|
24
|
+
"required_approving_review_count": 1,
|
|
25
|
+
"dismiss_stale_reviews_on_push": true,
|
|
26
|
+
"required_reviewers": [],
|
|
27
|
+
"require_code_owner_review": true,
|
|
28
|
+
"require_last_push_approval": true,
|
|
29
|
+
"required_review_thread_resolution": false,
|
|
30
|
+
"allowed_merge_methods": ["squash", "rebase"]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "required_linear_history"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "code_scanning",
|
|
38
|
+
"parameters": {
|
|
39
|
+
"code_scanning_tools": [
|
|
40
|
+
{
|
|
41
|
+
"tool": "CodeQL",
|
|
42
|
+
"security_alerts_threshold": "high_or_higher",
|
|
43
|
+
"alerts_threshold": "errors"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "code_quality",
|
|
50
|
+
"parameters": {
|
|
51
|
+
"severity": "errors"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "required_status_checks",
|
|
56
|
+
"parameters": {
|
|
57
|
+
"strict_required_status_checks_policy": true,
|
|
58
|
+
"do_not_enforce_on_create": false,
|
|
59
|
+
"required_status_checks": [
|
|
60
|
+
{
|
|
61
|
+
"context": "pre-commit.ci - pr",
|
|
62
|
+
"integration_id": 68672
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"context": "Codacy Static Code Analysis",
|
|
66
|
+
"integration_id": 56611
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"bypass_actors": []
|
|
73
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# This workflow assigns labels to PRs based on conventional commit titles.
|
|
2
|
+
|
|
3
|
+
# It looks at the commits in a pull request, mapping their commit types
|
|
4
|
+
# (and some scopes) into labels according to the mappings in this workflow file.
|
|
5
|
+
#
|
|
6
|
+
# You can adjust the specific behavior by modifying this file.
|
|
7
|
+
# For more information, see:
|
|
8
|
+
# https://github.com/dupuy/action-assign-labels?tab=readme-ov-file#computer-how-to-use-action-assign-labels
|
|
9
|
+
|
|
10
|
+
name: 'Assign labels to PRs from conventional commit titles'
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
pull_request_target:
|
|
14
|
+
branches: ['main']
|
|
15
|
+
types:
|
|
16
|
+
- opened
|
|
17
|
+
- ready_for_review
|
|
18
|
+
- reopened
|
|
19
|
+
- synchronize
|
|
20
|
+
|
|
21
|
+
# Declare default permissions as read only.
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
assign-labels:
|
|
27
|
+
runs-on: ubuntu-24.04
|
|
28
|
+
permissions:
|
|
29
|
+
pull-requests: write
|
|
30
|
+
steps:
|
|
31
|
+
- name: 'Harden runner'
|
|
32
|
+
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
|
|
33
|
+
with:
|
|
34
|
+
disable-sudo: true
|
|
35
|
+
egress-policy: block
|
|
36
|
+
allowed-endpoints: >
|
|
37
|
+
api.github.com:443
|
|
38
|
+
|
|
39
|
+
- name: 'Assign labels'
|
|
40
|
+
uses: dupuy/action-assign-labels@671a4ca2da0f900464c58b8b5540a1e07133e915 # v1.5.1
|
|
41
|
+
with:
|
|
42
|
+
apply-changes: true
|
|
43
|
+
conventional-commits: |
|
|
44
|
+
conventional-commits:
|
|
45
|
+
- type: 'fix'
|
|
46
|
+
nouns: ['fix']
|
|
47
|
+
labels: ['bug']
|
|
48
|
+
- type: 'feature'
|
|
49
|
+
nouns: ['feat']
|
|
50
|
+
labels: ['enhancement']
|
|
51
|
+
- type: 'breaking_change'
|
|
52
|
+
nouns: ['BREAKING CHANGE', 'BREAKING', 'feat!', 'fix!']
|
|
53
|
+
labels: ['major']
|
|
54
|
+
|
|
55
|
+
- type: 'build'
|
|
56
|
+
nouns: ['build', 'build(deps)', 'build(dev-deps)', 'chore']
|
|
57
|
+
labels: ['deployment']
|
|
58
|
+
- type: 'integration'
|
|
59
|
+
nouns: ['ci', 'test']
|
|
60
|
+
labels: ['testing']
|
|
61
|
+
- type: 'documentation'
|
|
62
|
+
nouns: ['docs']
|
|
63
|
+
labels: ['documentation']
|
|
64
|
+
- type: 'performance'
|
|
65
|
+
nouns: ['perf']
|
|
66
|
+
labels: ['performance']
|
|
67
|
+
- type: 'refactor'
|
|
68
|
+
nouns: ['refactor']
|
|
69
|
+
labels: ['refactor']
|
|
70
|
+
- type: 'style'
|
|
71
|
+
nouns: ['style']
|
|
72
|
+
labels: ['style']
|
|
73
|
+
|
|
74
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
75
|
+
maintain-labels-not-matched: true
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Source repository: https://github.com/codacy/codacy-coverage-reporter-action/blob/master/README.md#uploading-coverage-to-codacy
|
|
2
|
+
|
|
3
|
+
name: 'Codacy Coverage Reporter'
|
|
4
|
+
on:
|
|
5
|
+
- pull_request_target
|
|
6
|
+
- push
|
|
7
|
+
|
|
8
|
+
# Declare default permissions as read only.
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
codacy-coverage-reporter:
|
|
14
|
+
runs-on: ubuntu-24.04
|
|
15
|
+
name: codacy-coverage-reporter
|
|
16
|
+
# Only run on primary fork, since this requires a Codacy project token
|
|
17
|
+
if: github.repository == 'dupuy/reliabot'
|
|
18
|
+
steps:
|
|
19
|
+
- name: 'Harden runner'
|
|
20
|
+
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
|
|
21
|
+
with:
|
|
22
|
+
disable-sudo: true
|
|
23
|
+
egress-policy: block
|
|
24
|
+
allowed-endpoints: >
|
|
25
|
+
api.codacy.com:443
|
|
26
|
+
artifacts.codacy.com:443
|
|
27
|
+
files.pythonhosted.org:443
|
|
28
|
+
github.com:443
|
|
29
|
+
pypi.org:443
|
|
30
|
+
raw.githubusercontent.com:443
|
|
31
|
+
release-assets.githubusercontent.com:443
|
|
32
|
+
|
|
33
|
+
- name: 'Checkout repository'
|
|
34
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
35
|
+
with:
|
|
36
|
+
persist-credentials: false
|
|
37
|
+
|
|
38
|
+
- name: 'Install Poetry'
|
|
39
|
+
run: 'pipx install poetry'
|
|
40
|
+
|
|
41
|
+
- name: 'Set up Python'
|
|
42
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
43
|
+
with:
|
|
44
|
+
python-version: '3.12'
|
|
45
|
+
cache: 'poetry'
|
|
46
|
+
|
|
47
|
+
- name: 'Install dependencies with extras'
|
|
48
|
+
run: 'poetry install --extras re2 --with testing'
|
|
49
|
+
|
|
50
|
+
- name: 'Run tests with coverage'
|
|
51
|
+
run: 'poetry run tox -e py'
|
|
52
|
+
|
|
53
|
+
- name: 'Run codacy-coverage-reporter'
|
|
54
|
+
uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1.3.0
|
|
55
|
+
with:
|
|
56
|
+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
|
57
|
+
language: Python
|
|
58
|
+
coverage-reports: 'cobertura.xml'
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
+
# to commit it to your repository.
|
|
3
|
+
#
|
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
+
# or to provide custom queries or build logic.
|
|
6
|
+
name: 'CodeQL'
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches: ['main']
|
|
11
|
+
pull_request:
|
|
12
|
+
# The branches below must be a subset of the branches above
|
|
13
|
+
branches: ['main']
|
|
14
|
+
schedule:
|
|
15
|
+
- cron: '47 2 * * 1'
|
|
16
|
+
|
|
17
|
+
# Declare default permissions as read only.
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
analyze:
|
|
23
|
+
name: 'Analyze'
|
|
24
|
+
runs-on: ubuntu-24.04
|
|
25
|
+
permissions:
|
|
26
|
+
actions: read
|
|
27
|
+
contents: read
|
|
28
|
+
security-events: write
|
|
29
|
+
|
|
30
|
+
strategy:
|
|
31
|
+
fail-fast: false
|
|
32
|
+
matrix:
|
|
33
|
+
language: ['python']
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- name: 'Harden runner'
|
|
37
|
+
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
|
|
38
|
+
with:
|
|
39
|
+
disable-sudo: true
|
|
40
|
+
egress-policy: block
|
|
41
|
+
allowed-endpoints: >
|
|
42
|
+
api.github.com:443
|
|
43
|
+
github.com:443
|
|
44
|
+
objects.githubusercontent.com:443
|
|
45
|
+
release-assets.githubusercontent.com:443
|
|
46
|
+
uploads.github.com:443
|
|
47
|
+
|
|
48
|
+
- name: 'Checkout repository'
|
|
49
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
50
|
+
with:
|
|
51
|
+
persist-credentials: false
|
|
52
|
+
|
|
53
|
+
# Initializes the CodeQL tools for scanning.
|
|
54
|
+
- name: 'Initialize CodeQL'
|
|
55
|
+
uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
|
|
56
|
+
with:
|
|
57
|
+
languages: ${{ matrix.language }}
|
|
58
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
59
|
+
# By default, queries listed here will override any specified in a config file.
|
|
60
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
61
|
+
|
|
62
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
63
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
|
64
|
+
# [This is commented out since there are no compiled languages]
|
|
65
|
+
# - name: Autobuild
|
|
66
|
+
# uses: github/codeql-action/autobuild@v3
|
|
67
|
+
|
|
68
|
+
- name: 'Perform CodeQL analysis'
|
|
69
|
+
uses: github/codeql-action/analyze@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
|
|
70
|
+
with:
|
|
71
|
+
category: '/language:${{matrix.language}}'
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Dependency Review Action
|
|
2
|
+
#
|
|
3
|
+
# This Action will scan dependency manifest files that change as part of a Pull Request,
|
|
4
|
+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
|
|
5
|
+
# Once installed, if the workflow run is marked as required,
|
|
6
|
+
# PRs introducing known-vulnerable packages will be blocked from merging.
|
|
7
|
+
#
|
|
8
|
+
# Source repository: https://github.com/actions/dependency-review-action
|
|
9
|
+
|
|
10
|
+
name: 'Dependency review'
|
|
11
|
+
on: [pull_request]
|
|
12
|
+
|
|
13
|
+
# Declare default permissions as read only.
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
dependency-review:
|
|
19
|
+
runs-on: ubuntu-24.04
|
|
20
|
+
steps:
|
|
21
|
+
- name: 'Harden runner'
|
|
22
|
+
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
|
|
23
|
+
with:
|
|
24
|
+
disable-sudo: true
|
|
25
|
+
egress-policy: block
|
|
26
|
+
allowed-endpoints: >
|
|
27
|
+
api.deps.dev:443
|
|
28
|
+
api.github.com:443
|
|
29
|
+
github.com:443
|
|
30
|
+
|
|
31
|
+
- name: 'Checkout repository'
|
|
32
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
33
|
+
with:
|
|
34
|
+
persist-credentials: false
|
|
35
|
+
|
|
36
|
+
- name: 'Dependency review'
|
|
37
|
+
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub. They are provided
|
|
2
|
+
# by a third-party and are governed by separate terms of service, privacy
|
|
3
|
+
# policy, and support documentation.
|
|
4
|
+
|
|
5
|
+
name: 'Scorecard supply-chain security'
|
|
6
|
+
on:
|
|
7
|
+
# For Branch-Protection check. Only the default branch is supported. See
|
|
8
|
+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
|
9
|
+
branch_protection_rule: null # Run whenever a branch protection check occurs
|
|
10
|
+
# To guarantee Maintained check is occasionally updated. See
|
|
11
|
+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
|
12
|
+
schedule:
|
|
13
|
+
- cron: '36 23 * * 1'
|
|
14
|
+
push:
|
|
15
|
+
branches: ['main']
|
|
16
|
+
|
|
17
|
+
# Declare default permissions as read only.
|
|
18
|
+
permissions: read-all
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
analysis:
|
|
22
|
+
name: 'Scorecard analysis'
|
|
23
|
+
runs-on: ubuntu-24.04
|
|
24
|
+
permissions:
|
|
25
|
+
# Needed to upload the results to code-scanning dashboard.
|
|
26
|
+
security-events: write
|
|
27
|
+
# Needed to publish results and get a badge (see publish_results below).
|
|
28
|
+
id-token: write
|
|
29
|
+
|
|
30
|
+
steps:
|
|
31
|
+
- name: 'Harden runner'
|
|
32
|
+
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
|
|
33
|
+
with:
|
|
34
|
+
disable-sudo: true
|
|
35
|
+
egress-policy: block
|
|
36
|
+
allowed-endpoints: >
|
|
37
|
+
api.deps.dev:443
|
|
38
|
+
api.github.com:443
|
|
39
|
+
api.osv.dev:443
|
|
40
|
+
api.scorecard.dev:443
|
|
41
|
+
api.securityscorecards.dev:443
|
|
42
|
+
fulcio.sigstore.dev:443
|
|
43
|
+
github.com:443
|
|
44
|
+
oss-fuzz-build-logs.storage.googleapis.com:443
|
|
45
|
+
rekor.sigstore.dev:443
|
|
46
|
+
tuf-repo-cdn.sigstore.dev:443
|
|
47
|
+
www.bestpractices.dev:443
|
|
48
|
+
|
|
49
|
+
- name: 'Checkout repository'
|
|
50
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
51
|
+
with:
|
|
52
|
+
persist-credentials: false
|
|
53
|
+
|
|
54
|
+
- name: 'Run analysis'
|
|
55
|
+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
|
56
|
+
with:
|
|
57
|
+
results_file: results.sarif
|
|
58
|
+
results_format: sarif
|
|
59
|
+
publish_results: true
|
|
60
|
+
|
|
61
|
+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
|
62
|
+
# format to the repository Actions tab.
|
|
63
|
+
- name: 'Upload artifact'
|
|
64
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
65
|
+
with:
|
|
66
|
+
name: SARIF file
|
|
67
|
+
path: results.sarif
|
|
68
|
+
retention-days: 5
|
|
69
|
+
|
|
70
|
+
# Upload the results to GitHub's code scanning dashboard.
|
|
71
|
+
- name: 'Upload to code-scanning'
|
|
72
|
+
uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
|
|
73
|
+
with:
|
|
74
|
+
sarif_file: results.sarif
|