Skip to content

Commit 8740cae

Browse files
Mangaliso MngomezuluMangaliso Mngomezulu
authored andcommitted
CI mods
1 parent 35d216f commit 8740cae

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

.github/workflows/ci-build.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,9 @@ jobs:
7171
7272
# 1) Strict scan: all tracked files except notebooks
7373
detect-secrets scan \
74-
--exclude-files '*.ipynb' \
74+
--exclude-files '*\.ipynb$' \
7575
> .secrets.strict.json
7676
77-
7877
- name: Fail if new secrets appear vs baseline
7978

8079
run: |

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
hooks:
2323
- id: add-trailing-comma
2424
- repo: https://github.com/ibm/detect-secrets.git
25-
rev: 1f70358329b1f5dbe444df5c35c424b706bf8260
25+
rev: 0.13.1+ibm.62.dss
2626
hooks:
2727
- id: detect-secrets # pragma: whitelist secret
2828
# Add options for detect-secrets-hook binary. You can run `detect-secrets-hook --help` to list out all possible options.

.semgrep.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# .semgrep.yaml
3+
# Goal: do not fail on torch.load(..)
4+
5+
rules:
6+
7+
- id: python.deserialization.pickle
8+
9+
# 👇 Exclude torch.load from this rule so it won't be reported as ERROR:
10+
pattern-not: |
11+
torch.load(...)
12+
13+
# --- record torch.load usage as INFO, non-blocking ---
14+
- id: python.deserialization.pytorch.torch-load
15+
message: "torch.load detected (accepted for trusted checkpoints). Prefer weights_only=True."
16+
languages: [python]
17+
severity: INFO
18+
pattern: |
19+

0 commit comments

Comments
 (0)