@secretlint/secretlint-rule-no-k8s-kind-secret

A secretlint rule that disallow to use Kind: Secret in Kubernetes repository.

Usage no npm install needed!

<script type="module">
  import secretlintSecretlintRuleNoK8sKindSecret from 'https://cdn.skypack.dev/@secretlint/secretlint-rule-no-k8s-kind-secret';
</script>

README

@secretlint/secretlint-rule-no-k8s-kind-secret

A secretlint rule that disallow to use Kind: Secret in Kubernetes repository.

Install

Install with npm:

npm install @secretlint/secretlint-rule-no-k8s-kind-secret

Usage

Via .secretlintrc.json(Recommended)

{
    "rules": [
        {
            "id": "@secretlint/secretlint-rule-no-k8s-kind-secret"
        }
    ]
}

MessageIds

disallowToUseKindSecret

disallow to use Kind: Secret in manifest: {{FILE_NAME}}

Kubernetes's Kind: Secret includes credentials as plain format. It just base64 encoded value.

apiVersion: v1
kind: Secret
metadata:
  name: mysecret
type: Opaque
data:
  username: YWRtaW4=
  password: MWYyZDFlMmU2N2Rm

So, Kind: Secret manifest is not committable file into a repository.

In GitOps context, you can use another solution like SealedSecret, Vault etc...

Options

  • No Options

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm i -d && npm test

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