Skip to content

Commit

Permalink
Update Readme:
Browse files Browse the repository at this point in the history
Update help text for CLI options (fix typo in -i message description)
Add custom_pattern section with example
  • Loading branch information
svishwanath-tw committed Mar 10, 2020
1 parent 777878c commit f3ba960
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ For example, if your `init-env.sh` filename triggers a warning, you can only dis
this warning while still being alerted if other things go wrong (e.g. file content):


```bash
```yaml
fileignoreconfig:
- filename: init-env.sh
checksum: cf97abd34cebe895417eb4d97fbd7374aa138dcb65b1fe7f6b6cc1238aaf4d48
Expand Down Expand Up @@ -295,7 +295,7 @@ If any of the files are modified, talisman will scan the files again, unless you

You can choose to ignore files by specifying the language scope for your project in your talismanrc.

```
```yaml
scopeconfig:
- scope: go
- scope: node
Expand All @@ -307,6 +307,16 @@ You can specify multiple scopes.

Currently .talismanrc only supports scopeconfig support for go and node. Other scopes will be added shortly.

### Custom search patterns

You can specify custom regex patterns to look for in the current repository

```yaml
custom_patterns:
- pattern1
- pattern2
```

<br/><i>
**Note**: The use of .talismanignore has been deprecated. File .talismanrc replaces it because:

Expand All @@ -319,9 +329,10 @@ Currently .talismanrc only supports scopeconfig support for go and node. Other s
If you execute `talisman` on the command line, you will be able to view all the parameter options you can pass

```
-c, --checksum string checksum calculator calculates checksum and suggests .talsimarc format
-c, --checksum string checksum calculator calculates checksum and suggests .talismanrc format
-d, --debug enable debug mode (warning: very verbose)
-g, --githook string either pre-push or pre-commit (default "pre-push")
-i, --interactive interactively update talismanrc (only makes sense with -g/--githook)
-p, --pattern string pattern (glob-like) of files to scan (ignores githooks)
-r, --reportdirectory string directory where the scan reports will be stored
-s, --scan scanner scans the git commit history for potential secrets
Expand Down
4 changes: 2 additions & 2 deletions talisman.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ func main() {
flag.StringVarP(&pattern, "pattern", "p", "", "pattern (glob-like) of files to scan (ignores githooks)")
flag.StringVarP(&githook, "githook", "g", PrePush, "either pre-push or pre-commit")
flag.BoolVarP(&scan, "scan", "s", false, "scanner scans the git commit history for potential secrets")
flag.StringVarP(&checksum, "checksum", "c", "", "checksum calculator calculates checksum and suggests .talsimarc format")
flag.StringVarP(&checksum, "checksum", "c", "", "checksum calculator calculates checksum and suggests .talismanrc format")
flag.StringVarP(&reportdirectory, "reportdirectory", "r", "", "directory where the scan reports will be stored")
flag.BoolVarP(&scanWithHtml, "scanWithHtml", "w", false, "generate html report (**Make sure you have installed talisman_html_report to use this, as mentioned in Readme**)")
flag.BoolVarP(&interactive, "interactive", "i", false, "to be interactive or not")
flag.BoolVarP(&interactive, "interactive", "i", false, "interactively update talismanrc (only makes sense with -g/--githook)")

flag.Parse()

Expand Down

0 comments on commit f3ba960

Please sign in to comment.