nosecretsv0.4.0

← All examples

Exceptions on purpose, visible in review

A documented example carries an inline @nsi marker, a fixtures directory is ignored in .nosecrets.toml. Only the real staging token is reported.

Exceptions on purpose, visible in review

site/captures/usecases/exceptions/
# .nosecrets.toml
[ignore]
paths = ["tests/fixtures/"]

# app.py
DOC_EXAMPLE = "ghp_R2kT9xLm4Qv7Bn3Zc8Wd5Hf1Jg6Ys0AaPeXq"  # @nsi documented example value
STAGING = "ghp_Zp3Lk8Vn2Xc6Qw1Rt5Mb9Hd4Jf7Ys0GaNeUo"

# tests/fixtures/tokens.py
FIXTURE = "ghp_Qw8Er5Ty2Ui7Op1As4Df9Gh3Jk6Lz0XcVbNm"
$ git add -A
$ nosecrets scan --staged
app.py:2:12 [CRITICAL] GitHub Personal Access Token (github-pat) nsi_8c2b7cfaeaba
  preview: ghp_...NeUo
  • @nsi
  • .nosecrets.toml
  • ignore paths