Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@secretlint/secretlint-rule-preset-recommend

secretlint234.7kMIT9.3.3TypeScript support: included

Recommended rule preset of secretlint.

secretlint, rule, rule-preset

readme

@secretlint/secretlint-rule-preset-recommend

Recommended rule preset for secretlint.

Install

Install with npm:

npm install @secretlint/secretlint-rule-preset-recommend

Usage

Via .secretlintrc.json

{
    "rules": [
        {
            "id": "@secretlint/secretlint-rule-preset-recommend"
        }
    ]
}

Options

{
    "rules": [
        {
            "id": "@secretlint/secretlint-rule-preset-recommend",
            // You can override preset default options for each rule
            "rules": [
                {
                     "id": "@secretlint/secretlint-rule-aws",
                     "options": {
                          "allows": ["allowed token"]
                     }
                }
            ]
        }
    ]
}

If you want to ignore "AWSAccountID" and "AWSAccessKeyID" of "@secretlint/secretlint-rule-aws", you can configure following.

{
  "rules": [
    {
      "id": "@secretlint/secretlint-rule-preset-recommend",
      "rules": [
        {
          "id": "@secretlint/secretlint-rule-aws",
          "allowMessageIds": ["AWSAccountID", "AWSAccessKeyID"]
        }
      ]
    }
  ]
}

Rules

Notes

This preset module is bundled by Rollup. It is performance reason. Bundled file will reduce loading cost.

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm test

Import rule tests and update snapshot:

npm run import-test

:memo: It aims to test bundle version

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

6.0.2 (2023-01-03)

Bug Fixes

  • filter-comment: fix secretlint-disable comment parsing (#372) (df75539)

6.0.1 (2023-01-02)

Bug Fixes

  • deps: update dependency @textlint/linter-formatter to ^12.2.4 (e26d9dc)
  • deps: update dependency ajv to ^8.11.2 (497c106)
  • deps: update dependency nexe to ^4.0.0-rc.2 (0cd5273)
  • deps: update dependency rc-config-loader to ^4.1.1 (e8a732c)
  • deps: update dependency table to ^6.8.1 (489f457)
  • deps: update patch updates to ^12.2.3 (78aa14f)

Documentation

  • add "sourceContent" and "sourceContentType" to message (#362) (4cf620f)

  • fix!: Update README (#364) (e4e60a5), closes #364

Features

BREAKING CHANGES

  • It is just update for rule creator
  • you may need to update snapshots via @secretlint/tester

6.0.0 (2023-01-02)

Bug Fixes

  • deps: update dependency @textlint/linter-formatter to ^12.2.4 (e26d9dc)
  • deps: update dependency ajv to ^8.11.2 (497c106)
  • deps: update dependency nexe to ^4.0.0-rc.2 (0cd5273)
  • deps: update dependency rc-config-loader to ^4.1.1 (e8a732c)
  • deps: update dependency table to ^6.8.1 (489f457)
  • deps: update patch updates to ^12.2.3 (78aa14f)

Documentation

  • add "sourceContent" and "sourceContentType" to message (#362) (4cf620f)

  • fix!: Update README (#364) (e4e60a5), closes #364

Features

BREAKING CHANGES

  • It is just update for rule creator
  • you may need to update snapshots via @secretlint/tester

5.3.0 (2022-10-30)

Bug Fixes

  • deps: update dependency node-sarif-builder to ^2.0.3 (c99e4cc)
  • deps: update patch updates (eba8592)
  • github: remove duplicated gho- prefix (#323) (d70f815)

Features

  • secretlint-rule-github: support for fine-grained personal access tokens (#322) (9eae766)

5.2.4 (2022-08-24)

Bug Fixes

5.2.3 (2022-06-28)

Bug Fixes

  • fix secretlint ignore resolve logic (30a4f16)
  • support - in "allows" options (d22becc)

5.2.2 (2022-06-28)

Bug Fixes

  • docker: use latest formatter version (#282) (6103ff9)

Features

  • docker: install sarif formatter to docker image (#279) (f5ae422)

5.2.1 (2022-06-26)

Bug Fixes

  • config-loader: use native import() (#275) (7699777)
  • deps: update minor updates (0913164)

5.2.0 (2022-04-11)

Bug Fixes

  • monorepo: use lerna-lite instead of lerna (#250) (35fc82e)

Features

  • canary: add shopify (118c7b3)
  • implement rule for Shopify API keys (a897bea)
  • recommend: add shopify to recommended preset (1f166a3)

5.1.3 (2022-04-04)

Bug Fixes

  • deps: update minor updates (a11c9e0)

Features

5.1.2 (2022-04-04)

Bug Fixes

  • deps: update minor updates (a11c9e0)

Features

5.1.1 (2022-03-24)

Note: Version bump only for package root

5.1.0 (2022-03-08)

Bug Fixes

  • docker: update Node.js 16 (288230a)
  • refactor while loop + RegExp.exec → matchAll (#238) (1276228), closes #236

Features

5.0.1 (2022-03-05)

Bug Fixes

  • config-loader: do not apply prettier (bfdb32d)
  • secretlint-rule-filter-comments: remove unnecessary deps (#234) (60bf7f0)

5.0.0 (2022-03-05)

Bug Fixes

  • deps: update dependencies (7c665d5)

chore

Features

  • config-loader: improve validation to config (#224) (222555f)

BREAKING CHANGES

  • Drop Node.js 12 support
  • config-loader: this change will throw error some config that is already wrong.

  • fix: remove unused type

  • chore: update test

  • docs: fix

  • test: add assertion for rule/preset impl

  • test: add assertion for rule/preset impl

  • test: fix test snapshot

  • fix

  • chore: fix

4.2.1 (2022-03-02)

Bug Fixes

  • sarif: fix main file path (cf874e4)

4.2.0 (2022-03-02)

Features

  • sarif: add @secretlint/secretlint-formatter-sarif (#217) (6cdf303)

Performance Improvements

4.1.4 (2022-01-13)

Bug Fixes

  • secretlint-rule-gcp: update node-forge (#212) (10eae64)

4.1.3 (2021-10-13)

Note: Version bump only for package root

4.1.2 (2021-10-13)

Note: Version bump only for package root

4.1.1 (2021-10-11)

Bug Fixes

  • config-loader: fix to load secretlint rule on Windows (#206) (74526f4)

4.1.0 (2021-09-25)

Bug Fixes

  • github: token length should be 40 (6b41e01)

Features

  • npm: support npm_ prefix access token (#201) (20c4839)

4.0.0 (2021-09-15)

Bug Fixes

Features

  • config-loader: support a rule written by ESM (#187) (590c333)
  • preset: add @secretlint/secretlint-rule-filter-comments to presets (#198) (7f25af3)
  • secretlint-rule-filter-comments: secretlint-disable/secretlint-enable comment (#195) (607f361)

3.3.0 (2021-07-05)

Features

3.2.0 (2021-06-27)

Features

  • formatter: add "native" table formatter (#169) (6bd7910)

3.1.0 (2021-06-24)

Bug Fixes

Features

  • privatekey: support non cryptosystem name pattern (#173) (c211103)

3.0.0 (2021-05-29)

Features

  • preset-recommend: add GitHub to preset (#164) (c5fb277)

BREAKING CHANGES

  • preset-recommend: secretlint-rule-preset-recommend has been changed

  • It includes "@secretlint/secretlint-rule-github" by default

2.2.0 (2021-05-27)

Bug Fixes

Features

  • implement @secretlint/secretlint-rule-github (#160) (e4294f0)

2.1.1 (2020-11-04)

Note: Version bump only for package root

2.1.0 (2020-06-16)

Bug Fixes

  • secretlint: fix handling for non-ascii file path (#137) (510decf)

Features

  • rule: Creating new rule for SecretLint for using regular expressions (#139) (097921f)
  • secretlint-rule-no-homedir: add new rule (#136) (447e2e0)

2.0.0 (2020-04-27)

Bug Fixes

  • tester: sort object be property name (#133) (f684cdf)
  • add word length limits for clarity (e5b5867)
  • make rule specific to sendgrid (cda8b6c)
  • missing escape on regex dot chars (3e12160)
  • remove generic api rule (40ae9b1)
  • core: change SecretLintRuleMessageTranslate to check statically (03ccff1)

Features

  • recommended-preset: add sendgrid rule (#131) (0bcbe2e)
  • add generic key detection (8dcb023)

BREAKING CHANGES

  • core: It changes SecretLintRuleMessageTranslate interface

Rule need to change messages object format.

1.1.0 (2020-04-04)

Features

  • secretlint-rule-no-dotenv: add new rule (99959b2)

1.0.5 (2020-04-03)

Bug Fixes

  • secretlint-rule-no-k8s-kind-secret: fix detect logic (d0cbab7)

1.0.4 (2020-03-31)

Bug Fixes

  • core: fix placeholder assertion for rule (c48b380), closes #116

1.0.3 (2020-03-30)

Note: Version bump only for package root

1.0.2 (2020-03-29)

Bug Fixes

  • secretlint-rule-secp256k1-privatekey: handle thrown exception due to invalid key (#110) (320b344)

1.0.1 (2020-03-29)

Bug Fixes

  • secretlint-rule-preset-canary: fix id name (4c91c60)
  • japanese message translation (629125a)
  • package author (dddd0f7)

Features

  • secretlint-rule-preset-canary: add secretlint-rule-secp256k1-privatekey (d9d93ed)
  • check for the presence of secp256k1 curve private keys (a8f1902)

Reverts

  • remove secretlint-rule-secp256k1-privatekey from canary (d6b3aea)

1.0.0 (2020-03-18)

Note: Version bump only for package root

0.10.1 (2020-03-18)

Bug Fixes

  • publish-binary: fix config (429fa9f)

0.10.0 (2020-03-18)

Bug Fixes

  • publish: split publish to binary (b4a358c)
  • publish-binary: fix config (1596c37)
  • publish-binary: fix config (8d82565)

Features

  • core: support locale options (256a58c)
  • preset-canary: add secretlint-rule-preset-canary (4100626)

0.9.2 (2020-03-16)

Note: Version bump only for package root

0.9.1 (2020-03-16)

Note: Version bump only for package root

0.9.0 (2020-03-16)

Bug Fixes

  • binary-compiler: fix binary compiler workflow (13a1660)
  • deps: add @changesets/changelog-github (4cd589a)
  • deps: revert @changesets/changelog-github (f8560bd)
  • messages-to-markdown: rename bin script (c6a620c)

Features

  • cli: support --secretlintrcJSON flag (#78) (449b4a1)

Performance Improvements

  • profiler: add profile mark to config-loader (d127d23)
  • secretlint-rule-preset-recommend: rollup (#76) (71c382a)

0.7.3 (2020-03-01)

Bug Fixes

  • node: add concurrency limit to lint (b966a3a), closes #72

0.7.2 (2020-03-01)

Bug Fixes

  • secretlint-rule-gcp: fix plaice holder of report (f25cb0b)

0.7.1 (2020-03-01)

Bug Fixes

  • quick-start: add config/ as files (15488ec)

0.7.0 (2020-03-01)

Bug Fixes

  • quick-start: fix bin script name (#70) (8887af1)
  • quick-start: fix env type (9a797ac)

Features

  • quick-start: add @secretlint/quick-start module (8c7c298)

0.6.0 (2020-02-29)

Bug Fixes

  • secretlint-rule-basicauth: fix regexp pattern (5bb36be)

Features

0.5.0 (2020-02-28)

Features

  • cli: add --debug flag (d9326d5)
  • gcp: add @secretlint/secretlint-rule-gcp (130973d)
  • secretlint-rule-preset-recommend: add @secretlint/secretlint-rule-gcp (8ab7b00)

0.4.2 (2020-02-28)

Bug Fixes

  • core: fix allowMessageIds of preset's rule options (7dcb506)
  • lerna: add --no-push for waiting docker image (b53471a)

0.4.1 (2020-02-28)

Bug Fixes

  • aws: remove console.log (0bf11ae)

0.4.0 (2020-02-28)

Bug Fixes

  • binary-compiler: use name includes OS (a89e599)

Features

  • core: support "disabled" options (17c1391)
  • core: support "disabledMessages" options (17de33e)
  • core: support Context#ignore method (7ca0445)
  • types: rule require messages (412803e)

0.3.0 (2020-02-27)

Bug Fixes

Features

  • basicauth: add @secretlint/secretlint-rule-basicauth (464d2cd)
  • binary: add secretlint binary (6acdeb7)
  • docker: add Docker Workflow (263bad0)
  • preset-recommend: add @secretlint/secretlint-rule-basicauth (0acf113)
  • preset-recommend: add @secretlint/secretlint-rule-slack as preset (1e8c4f4)
  • secretlint-rule-slack: add @secretlint/secretlint-rule-slack (d3d9f5b)
  • secretlint-scripts: add secretlint-scripts is wrapper of tsc (3fcb7db)

0.2.0 (2020-02-23)

Bug Fixes

  • aws: report only found Access key (cfa0d4d), closes #32
  • cli: prevent to output profile if no --profile flag (17b8570)
  • example: fix example (82a18a5)
  • example: use preset (73893d6)
  • tester: Make testDefinitions optional (04b8dcc)

Features

  • benchmark: add benchmark scripts (#38) (8b48f42)
  • profiler: add --profiler flag (#40) (0f86e54)
  • rule: add supportedContentTypes to rule meta (#39) (3883c75)

Performance Improvements

  • core: skip lint with rule if the rule does not support contentType (1e2eb3e), closes #39

0.1.2 (2020-02-16)

Bug Fixes

0.1.1 (2020-02-16)

Note: Version bump only for package root

0.1.0 (2020-02-16)

Bug Fixes

  • @secretlint/secretlint-rule-privatekey: fix (3f7513e)
  • cli: fix exit status (04d9b41)
  • cli: fix exitStatus of linting result (c94ec15), closes #11
  • cli: fix ignore error (329f689)
  • cli: support root / in .secretlintignore (abb94e3)
  • config-loader: rule will be undefined (9a109a6)
  • config-loader: rule will be undefined (c0c2bcd)
  • core: separate options to rules in preset (1b16638)
  • types: fix type (08b113c)
  • fix type name (08d39e8)
  • optional docs (3d27587)

Features

  • cli: add .git ignore by default (e6bfe7a)
  • cli: add secretlint --init (c83751a)
  • cli: implement --output-file (0a33866)
  • config-loader: add config-loader (c56e8a3)
  • config-loader: add validation on loading (686b879)
  • config-validator: support rule preset validation (4784e16)
  • core: add basic core (248e312)
  • core: check duplicated rule registration (22db54e)
  • core: support ruleId implicitly (1aa6d5c)
  • core: support Localization (845f24a)
  • core: support severity options (876e936)
  • formatter: add @secretlint/formatter (2b2d9ab)
  • messages-to-markdown: add messages-to-markdown (69580e5)
  • node: implement @secretlint/node (acd3dd2)
  • node: support configFilePath (682bb60)
  • npm: add @secretlint/secretlint-rule-npm (b0c891f)
  • secretlint: implement secretlint package as CLI (6765e2d)
  • secretlint: node_modules is ignored by default (2844962), closes #22
  • secretlint-rule-preset-recommend: implement secretlint-rule-preset-recommend (2728140)
  • tester: support .secretlintrc options via file (c137c00)
  • add test case (747bb57)
  • preset (868ac0f)
  • secretlint-rule-privatekey: implement @secretlint/secretlint-rule-privatekey (f2038a5)