sanctify 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.pre-commit-hooks.yaml +1 -0
- data/README.md +44 -4
- data/lib/sanctify/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf59b1007b7caeecd87c0ddd8e7ba24f161d7b09
|
|
4
|
+
data.tar.gz: 1761816197a0ff15372dfa777494b1dad5e63189
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78b2a2a600785a4937480755ab7a14b615a03e6e9509ad863ea537d44756ad88a9a704dac9a958aca826f4c7735f8a33ed19764e32b44cdff2f84e0700f16d4b
|
|
7
|
+
data.tar.gz: 21ed93a8d1c341bf2d8c673fc754e03939e0dabece00f42de0077efaa5bb134a103106f29971a1f22ddcb34b7ea059c66ab83c8080d1b6b42f7e28d7d17569fb
|
data/.pre-commit-hooks.yaml
CHANGED
data/README.md
CHANGED
|
@@ -29,6 +29,7 @@ Usage: sanctify [-r REPO_PATH] [-c CONFIG_PATH] [-d FROM_COMMIT..TO_COMMIT | -d
|
|
|
29
29
|
-r, --repo REPO Repo to test
|
|
30
30
|
-c, --config CONFIG Configuration file in YAML
|
|
31
31
|
-d, --diff DIFF Specify a diff or commit from which to check secrets
|
|
32
|
+
-v, --version Prints the version and exits
|
|
32
33
|
-h, --help Prints this help
|
|
33
34
|
```
|
|
34
35
|
|
|
@@ -37,7 +38,7 @@ To integrate with pre-commit, add the following to your `pre-commit-config.yaml`
|
|
|
37
38
|
```
|
|
38
39
|
repos:
|
|
39
40
|
- repo: https://github.com/onetwopunch/sanctify
|
|
40
|
-
sha: v0.2.
|
|
41
|
+
sha: v0.2.5
|
|
41
42
|
hooks:
|
|
42
43
|
- id: sanctify
|
|
43
44
|
args:
|
|
@@ -81,12 +82,51 @@ The list of current default matchers are located in `lib/sanctify/matcher_list.
|
|
|
81
82
|
|
|
82
83
|
If you see any problem with a default matcher list or would like to add another to the default list, please feel free to make a pull request.
|
|
83
84
|
|
|
85
|
+
## Troubleshooting
|
|
86
|
+
|
|
87
|
+
- If you are facing an issue with integration with a Rail project, where you are using rbenv, and get the following error:
|
|
88
|
+
```
|
|
89
|
+
An unexpected error has occurred: CalledProcessError: Command: (u'/bin/bash', u'/Users/ryan/.rbenv/shims/gem', 'build', 'sanctify.gemspec')
|
|
90
|
+
Return code: 1
|
|
91
|
+
Expected return code: 0
|
|
92
|
+
Output: (none)
|
|
93
|
+
Errors:
|
|
94
|
+
WARNING: See http://guides.rubygems.org/specification-reference/ for help
|
|
95
|
+
ERROR: While executing gem ... (Gem::InvalidSpecificationException)
|
|
96
|
+
["travis.yml", "literally every file in your Rails repo", ...]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
This is an issue with pre-commit since they build their own version of rbenv that conflicts under certain circumstances I have yet to fully grok. The best way to get around this is to install sanctify external to the pre-commit repo.
|
|
100
|
+
|
|
101
|
+
In your pre-commit-config.yaml:
|
|
102
|
+
|
|
103
|
+
```yaml
|
|
104
|
+
- repo: local
|
|
105
|
+
hooks:
|
|
106
|
+
- id: secret-check-hook
|
|
107
|
+
name: "Sanctify Secret Scanner"
|
|
108
|
+
entry: ./bin/secret-check
|
|
109
|
+
language: script
|
|
110
|
+
files: .
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
And then in the `./bin/secret-check` file just install and run sanctify:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
#!/bin/bash
|
|
117
|
+
|
|
118
|
+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
119
|
+
if [[ ! $(which sanctify) ]]; then
|
|
120
|
+
gem install sanctify
|
|
121
|
+
fi
|
|
122
|
+
|
|
123
|
+
sanctify -c $DIR/sanctify.yml
|
|
124
|
+
```
|
|
125
|
+
|
|
84
126
|
## Development
|
|
85
127
|
|
|
86
128
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
87
129
|
|
|
88
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
89
|
-
|
|
90
130
|
## Contributing
|
|
91
131
|
|
|
92
132
|
Bug reports and pull requests are welcome on GitHub at https://github.com/onetwopunch/sanctify. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
@@ -97,4 +137,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
97
137
|
|
|
98
138
|
## Code of Conduct
|
|
99
139
|
|
|
100
|
-
Everyone interacting in the Sanctify project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
140
|
+
Everyone interacting in the Sanctify project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/onetwopunch/sanctify/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/sanctify/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sanctify
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Canty
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-01-
|
|
11
|
+
date: 2018-01-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|