Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bbad7af

Browse files
authored
Merge branch 'master' into retry-all-methods
2 parents 0e946e2 + cd25003 commit bbad7af

File tree

6 files changed

+126
-5
lines changed

6 files changed

+126
-5
lines changed

.github/workflows/codeql.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CodeQL
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
types:
7+
- opened
8+
- synchronize
9+
push:
10+
branches:
11+
- master
12+
schedule:
13+
- cron: "56 12 * * 1"
14+
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
22+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
23+
24+
jobs:
25+
analyze:
26+
name: Check for Vulnerabilities
27+
runs-on: ubuntu-latest
28+
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
language: [python]
33+
34+
steps:
35+
- if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group'
36+
run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
37+
38+
- name: Checkout
39+
uses: actions/checkout@v3
40+
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v2
43+
with:
44+
languages: ${{ matrix.language }}
45+
queries: +security-and-quality
46+
47+
- name: Autobuild
48+
uses: github/codeql-action/autobuild@v2
49+
50+
- name: Perform CodeQL Analysis
51+
uses: github/codeql-action/analyze@v2
52+
with:
53+
category: "/language:${{ matrix.language }}"

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build Documentation
33
on:
44
push:
55
branches:
6-
- "master"
6+
- master
77

88
permissions:
99
contents: read
File renamed without changes.

.github/workflows/semgrep.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,31 @@ on:
1515
permissions:
1616
contents: read
1717

18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
21+
1822
jobs:
1923
authorize:
2024
name: Authorize
21-
environment: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
25+
environment: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
2226
runs-on: ubuntu-latest
2327
steps:
2428
- run: true
2529

2630
run:
27-
if: (github.actor != 'dependabot[bot]')
2831
needs: authorize # Require approval before running on forked pull requests
2932

30-
name: Run
33+
name: Check for Vulnerabilities
3134
runs-on: ubuntu-latest
3235

3336
container:
3437
image: returntocorp/semgrep
3538

3639
steps:
40+
- if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group'
41+
run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
42+
3743
- uses: actions/checkout@v3
3844
with:
3945
ref: ${{ github.event.pull_request.head.sha || github.ref }}

.github/workflows/snyk.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Snyk
2+
3+
on:
4+
merge_group:
5+
pull_request_target:
6+
types:
7+
- opened
8+
- synchronize
9+
push:
10+
branches:
11+
- master
12+
schedule:
13+
- cron: "30 0 1,15 * *"
14+
15+
permissions:
16+
security-events: write
17+
actions: read
18+
contents: read
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
22+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
23+
24+
jobs:
25+
authorize:
26+
name: Authorize
27+
environment: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
28+
runs-on: ubuntu-latest
29+
steps:
30+
- run: true
31+
32+
check:
33+
needs: authorize
34+
35+
name: Check for Vulnerabilities
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
- if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group'
40+
run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
41+
42+
- uses: actions/checkout@v3
43+
with:
44+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
45+
46+
- uses: snyk/actions/python-3.7@b98d498629f1c368650224d6d212bf7dfa89e4bf # [email protected]
47+
continue-on-error: true # Make sure the SARIF upload is called
48+
env:
49+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
50+
with:
51+
args: --sarif-file-output=snyk.sarif
52+
53+
- name: Upload result to GitHub Code Scanning
54+
uses: github/codeql-action/upload-sarif@v2
55+
with:
56+
sarif_file: snyk.sarif

.github/workflows/build.yml renamed to .github/workflows/test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ on:
1313
permissions:
1414
contents: read
1515

16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
18+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
19+
1620
jobs:
1721
authorize:
1822
name: Authorize
19-
environment: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
23+
environment: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
2024
runs-on: ubuntu-latest
2125
steps:
2226
- run: true
@@ -48,6 +52,8 @@ jobs:
4852
steps:
4953
- name: Checkout code
5054
uses: actions/checkout@v3
55+
with:
56+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
5157

5258
- name: Configure Python ${{ matrix.python-version }}
5359
uses: actions/setup-python@v4

0 commit comments

Comments
 (0)