Skip to content

Commit b9f425c

Browse files
committed
add secret pre-commit
1 parent eab2d7a commit b9f425c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
}
6262
}
6363
},
64+
"remoteEnv": { "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" },
6465
"postCreateCommand": "rm -f ~/.docker/config.json; git config --global --add safe.directory /workspaces/eps-FHIR-validator-lambda; make install"
6566
// "features": {},
6667
// Use 'forwardPorts' to make a list of ports inside the container available locally.

.pre-commit-config.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ repos:
2121
hooks:
2222
- id: flake8
2323

24-
24+
- repo: local
25+
hooks:
26+
- id: git-secrets
27+
name: Git Secrets
28+
description: git-secrets scans commits, commit messages, and --no-ff merges to prevent adding secrets into your git repositories.
29+
entry: bash
30+
args:
31+
- -c
32+
- 'docker run -v "$LOCAL_WORKSPACE_FOLDER:/src" git-secrets --pre_commit_hook'
33+
language: system
2534
fail_fast: true
2635
default_stages: [commit]

0 commit comments

Comments
 (0)