Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ uv.lock # remove if you want to pin versions.

#secrets
.env

#other modules
node_modules/
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,13 @@ repos:
types: [python]
pass_filenames: false # Run full test suite
stages: [pre-commit] # Only run on pre-commit
- repo: local
hooks:
- id: secretlint
name: secretlint
entry: npx secretlint --maskSecrets
language: node
types: [text]
files: ^.*\.(py|js|ts|json|yml|yaml|env|txt)$
exclude: (^|/)(node_modules|\.git|\.venv|__pycache__)/
pass_filenames: true
5 changes: 5 additions & 0 deletions .secretlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore virtual environments, cache, and dependencies
.venv/
__pycache__/
node_modules/
.git/
7 changes: 7 additions & 0 deletions .secretlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"rules": [
{
"id": "@secretlint/secretlint-rule-preset-recommend"
}
]
}
20 changes: 20 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ BRANCH_NAME := "test-actions-" + DATE_TIME
if ! command -v just >/dev/null 2>&1; then echo "just is not installed"; exit 1; fi
if ! command -v pre-commit >/dev/null 2>&1; then echo "{{YELLOW}}WARNING: pre-commit is not installed{{NC}}"; fi
if ! command -v taplo >/dev/null 2>&1; then echo "Taplo is not installed"; exit 1; fi
if ! npx --no-install secretlint --version >/dev/null 2>&1; then echo "{{YELLOW}}WARNING: secretlint is not installed via npm{{NC}}"; fi
echo "All required tools are installed"

alias c := check-deps
Expand Down Expand Up @@ -147,6 +148,25 @@ alias l := lint

alias tc := typecheck

# Install Secretlint
[group('install')]
@install-secretlint:
if ! npx --no-install secretlint --version > /dev/null 2>&1; then \
echo "{{YELLOW}}Secretlint not found. Installing...{{NC}}"; \
npm install secretlint @secretlint/secretlint-rule-preset-recommend --save-dev && \
echo "{{GREEN}}Secretlint installed successfully.{{NC}}"; \
else \
echo "{{GREEN}}Secretlint is already installed.{{NC}}"; \
fi

# Run Lint secrets
[group('dev'), group('pre-commit')]
@lint-secrets:
echo "🔍 Running secretlint... Please wait."
npx --yes secretlint "**/*" && echo "✅ Secretlint completed successfully." || (echo "❌ Secretlint found issues!" && exit 1)

alias ls := lint-secrets

# Run tests
[group('test'), group('dev')]
@test *options:
Expand Down
Loading
Loading