Skip to content
This repository was archived by the owner on Jun 15, 2022. It is now read-only.
This repository was archived by the owner on Jun 15, 2022. It is now read-only.

Testing of seekrets rulesets using BATS #74

@LinuxBozo

Description

@LinuxBozo

In order to ensure that our regex rules are correct, they should be tested, using BATS and run automatically with Travis.

Rulesets for git-seekrets are defined as regex inside a yaml file. These include rule name, the regex for the match, and any acceptable false positives as unmatch. Existing rulesets that need tests defined are here:
https://github.com/18F/laptop/tree/seekret/seekret-rules

Depends on #75 for easier implementation.

If fixing, please use seekret branch so it's merged into PR #69

More about the rules YAML: https://github.com/apuigsech/seekret/blob/75ab481819b4c1e1794497defea9a9332943295b/README.rst#rules

Acceptance Criteria

  • Install git seekret in a repeatable way ( should be covered in another story )
  • Install BATS in a repeatable way, readme
  • Write BATS tests for each of these:
    • Check for git seekret installation.
    • Check for rulesets enabled.
    • Check that git seekret is called on a test repository and secrets are detected. (positives)
    • Check that git seekret is called on a test repository and non-secrets are not detected. (acceptable false positives)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions