Skip to content

Commit ed147df

Browse files
style fix
Signed-off-by: Barabanov <[email protected]>
1 parent 955bb94 commit ed147df

File tree

6 files changed

+190
-190
lines changed

6 files changed

+190
-190
lines changed

.github/dependabot.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
version: 2
2-
updates:
3-
- package-ecosystem: "github-actions"
4-
directory: /
5-
schedule:
6-
interval: "weekly"
7-
target-branch: "master"
8-
groups:
9-
github-actions-dependency:
10-
applies-to: version-updates
11-
patterns:
12-
- "*"
13-
- package-ecosystem: pip
14-
directory: /src/python
15-
schedule:
16-
interval: weekly
17-
target-branch: "master"
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: /
5+
schedule:
6+
interval: "weekly"
7+
target-branch: "master"
8+
groups:
9+
github-actions-dependency:
10+
applies-to: version-updates
11+
patterns:
12+
- "*"
13+
- package-ecosystem: pip
14+
directory: /src/python
15+
schedule:
16+
interval: weekly
17+
target-branch: "master"

.github/workflows/codeql.yml

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
name: "CodeQL Scan"
2-
3-
on:
4-
push:
5-
branches: ["master"]
6-
pull_request:
7-
branches: ["master"]
8-
schedule:
9-
- cron: "37 3 * * 0"
10-
11-
permissions: {} # No permissions by default on workflow level
12-
13-
jobs:
14-
analyze:
15-
name: Analyze (${{ matrix.language }})
16-
runs-on: ubuntu-latest
17-
permissions:
18-
security-events: write # required to publish sarif
19-
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
include:
24-
- language: actions
25-
build-mode: none
26-
- language: python
27-
build-mode: none
28-
- language: c-cpp
29-
build-mode: none
30-
31-
steps:
32-
- name: Checkout repository
33-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
34-
with:
35-
persist-credentials: false
36-
37-
# Initializes the CodeQL tools for scanning.
38-
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
40-
with:
41-
languages: ${{ matrix.language }}
42-
build-mode: ${{ matrix.build-mode }}
43-
queries: security-extended
44-
45-
- name: Perform CodeQL Analysis
46-
uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
47-
with:
48-
category: "/language:${{matrix.language}}"
1+
name: "CodeQL Scan"
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
branches: ["master"]
8+
schedule:
9+
- cron: "37 3 * * 0"
10+
11+
permissions: {} # No permissions by default on workflow level
12+
13+
jobs:
14+
analyze:
15+
name: Analyze (${{ matrix.language }})
16+
runs-on: ubuntu-latest
17+
permissions:
18+
security-events: write # required to publish sarif
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- language: actions
25+
build-mode: none
26+
- language: python
27+
build-mode: none
28+
- language: c-cpp
29+
build-mode: none
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
34+
with:
35+
persist-credentials: false
36+
37+
# Initializes the CodeQL tools for scanning.
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
40+
with:
41+
languages: ${{ matrix.language }}
42+
build-mode: ${{ matrix.build-mode }}
43+
queries: security-extended
44+
45+
- name: Perform CodeQL Analysis
46+
uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
47+
with:
48+
category: "/language:${{matrix.language}}"

.github/workflows/pre_commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ jobs:
8282
severity-level: "LOW"
8383
confidence-level: "LOW"
8484
config_file: "src/python/pyproject.toml"
85-
fail-on-findings: true
85+
fail-on-findings: true

.github/workflows/scorecards.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
name: Scorecards supply-chain security
2-
on:
3-
# For Branch-Protection check. Only the default branch is supported. See
4-
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
5-
branch_protection_rule:
6-
schedule:
7-
# Run security checks every day at 2 AM UTC
8-
- cron: "0 2 * * *"
9-
workflow_dispatch:
10-
11-
permissions: {}
12-
13-
jobs:
14-
analysis:
15-
name: Scorecards analysis
16-
runs-on: ubuntu-latest
17-
permissions:
18-
# Needed to upload the results to code-scanning dashboard
19-
security-events: write
20-
# Needed to publish results and get a badge
21-
id-token: write
22-
23-
steps:
24-
- name: Checkout code
25-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26-
with:
27-
persist-credentials: false
28-
29-
- name: Run analysis
30-
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
31-
with:
32-
results_file: results.sarif
33-
results_format: sarif
34-
publish_results: true
35-
36-
# Upload the results to GitHub's code scanning dashboard
37-
- name: Upload to code-scanning
38-
uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
39-
with:
40-
sarif_file: results.sarif
1+
name: Scorecards supply-chain security
2+
on:
3+
# For Branch-Protection check. Only the default branch is supported. See
4+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
5+
branch_protection_rule:
6+
schedule:
7+
# Run security checks every day at 2 AM UTC
8+
- cron: "0 2 * * *"
9+
workflow_dispatch:
10+
11+
permissions: {}
12+
13+
jobs:
14+
analysis:
15+
name: Scorecards analysis
16+
runs-on: ubuntu-latest
17+
permissions:
18+
# Needed to upload the results to code-scanning dashboard
19+
security-events: write
20+
# Needed to publish results and get a badge
21+
id-token: write
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
persist-credentials: false
28+
29+
- name: Run analysis
30+
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
31+
with:
32+
results_file: results.sarif
33+
results_format: sarif
34+
publish_results: true
35+
36+
# Upload the results to GitHub's code scanning dashboard
37+
- name: Upload to code-scanning
38+
uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
39+
with:
40+
sarif_file: results.sarif
Lines changed: 83 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,83 @@
1-
name: Security Scans
2-
3-
on:
4-
schedule:
5-
# Run security checks every day at 2 AM UTC
6-
- cron: "0 2 * * *"
7-
workflow_dispatch:
8-
push:
9-
branches:
10-
- master
11-
- release**
12-
13-
permissions: {}
14-
15-
jobs:
16-
zizmor-scan:
17-
runs-on: ubuntu-latest
18-
permissions:
19-
contents: read
20-
security-events: write # Needed to upload the results to code-scanning dashboard
21-
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24-
with:
25-
persist-credentials: false
26-
- name: Run Zizmor scan
27-
uses: open-edge-platform/anomalib/.github/actions/security/zizmor@fadfedd5150eb8cd39dfb659ae9bd0eb1c06720d
28-
with:
29-
scan-scope: "all"
30-
severity-level: "LOW"
31-
confidence-level: "LOW"
32-
fail-on-findings: false # reports only
33-
34-
bandit-scan:
35-
runs-on: ubuntu-latest
36-
permissions:
37-
contents: read
38-
security-events: write # Needed to upload the results to code-scanning dashboard
39-
steps:
40-
- name: Checkout code
41-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
42-
with:
43-
persist-credentials: false
44-
- name: Run Bandit scan
45-
uses: open-edge-platform/anomalib/.github/actions/security/bandit@fadfedd5150eb8cd39dfb659ae9bd0eb1c06720d
46-
with:
47-
scan-scope: "all"
48-
severity-level: "LOW"
49-
confidence-level: "LOW"
50-
config_file: "src/python/pyproject.toml"
51-
fail-on-findings: false # reports only
52-
53-
trivy-scan:
54-
runs-on: ubuntu-latest
55-
permissions:
56-
contents: read
57-
security-events: write # Needed to upload the results to code-scanning dashboard
58-
steps:
59-
- name: Checkout code
60-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61-
with:
62-
persist-credentials: false
63-
- name: Set up Python
64-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
65-
with:
66-
python-version: "3.10"
67-
- name: Install pip-tools
68-
run: python -m pip install pip-tools
69-
70-
- name: Freeze dependencies
71-
run: pip-compile --extra=full -o requirements.txt src/python/pyproject.toml
72-
73-
- name: Run Trivy scan
74-
id: trivy
75-
uses: open-edge-platform/anomalib/.github/actions/security/trivy@fadfedd5150eb8cd39dfb659ae9bd0eb1c06720d
76-
with:
77-
scan_type: "fs"
78-
scan-scope: all
79-
severity: LOW
80-
scanners: "vuln,secret,config"
81-
format: "sarif"
82-
timeout: "15m"
83-
ignore_unfixed: "false"
1+
name: Security Scans
2+
3+
on:
4+
schedule:
5+
# Run security checks every day at 2 AM UTC
6+
- cron: "0 2 * * *"
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- master
11+
- release**
12+
13+
permissions: {}
14+
15+
jobs:
16+
zizmor-scan:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
security-events: write # Needed to upload the results to code-scanning dashboard
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+
with:
25+
persist-credentials: false
26+
- name: Run Zizmor scan
27+
uses: open-edge-platform/anomalib/.github/actions/security/zizmor@fadfedd5150eb8cd39dfb659ae9bd0eb1c06720d
28+
with:
29+
scan-scope: "all"
30+
severity-level: "LOW"
31+
confidence-level: "LOW"
32+
fail-on-findings: false # reports only
33+
34+
bandit-scan:
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: read
38+
security-events: write # Needed to upload the results to code-scanning dashboard
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
42+
with:
43+
persist-credentials: false
44+
- name: Run Bandit scan
45+
uses: open-edge-platform/anomalib/.github/actions/security/bandit@fadfedd5150eb8cd39dfb659ae9bd0eb1c06720d
46+
with:
47+
scan-scope: "all"
48+
severity-level: "LOW"
49+
confidence-level: "LOW"
50+
config_file: "src/python/pyproject.toml"
51+
fail-on-findings: false # reports only
52+
53+
trivy-scan:
54+
runs-on: ubuntu-latest
55+
permissions:
56+
contents: read
57+
security-events: write # Needed to upload the results to code-scanning dashboard
58+
steps:
59+
- name: Checkout code
60+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+
with:
62+
persist-credentials: false
63+
- name: Set up Python
64+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
65+
with:
66+
python-version: "3.10"
67+
- name: Install pip-tools
68+
run: python -m pip install pip-tools
69+
70+
- name: Freeze dependencies
71+
run: pip-compile --extra=full -o requirements.txt src/python/pyproject.toml
72+
73+
- name: Run Trivy scan
74+
id: trivy
75+
uses: open-edge-platform/anomalib/.github/actions/security/trivy@fadfedd5150eb8cd39dfb659ae9bd0eb1c06720d
76+
with:
77+
scan_type: "fs"
78+
scan-scope: all
79+
severity: LOW
80+
scanners: "vuln,secret,config"
81+
format: "sarif"
82+
timeout: "15m"
83+
ignore_unfixed: "false"

src/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,4 @@ notice-rgx = """
251251
[tool.bandit]
252252
exclude_dirs = ["tests"]
253253
tests = ["B301","B302","B303","B304","B305","B306","B308","B310","B311","B312","B313","B314","B315","B316","B317","B318","B319","B321","B323","B324","B401","B402","B403","B404","B405","B406","B407","B408","B409","B411","B412","B413"]
254-
skips = ["B101","B102","B103","B104","B105","B106","B107","B108","B110","B112","B201","B501","B502","B503","B504","B505","B506","B507","B601","B602","B603","B604","B605","B606","B607","B608","B609","B610","B611","B701","B702","B703"]
254+
skips = ["B101","B102","B103","B104","B105","B106","B107","B108","B110","B112","B201","B501","B502","B503","B504","B505","B506","B507","B601","B602","B603","B604","B605","B606","B607","B608","B609","B610","B611","B701","B702","B703"]

0 commit comments

Comments
 (0)