Comments (2)
Hi @roshvin, and thanks for the question.
I'm not aware of any example at present for using Nosey Parker in a pre-receive hook for GitHub Enterprise Server. (Presumably the use case there is to be able to scan for secrets at push time, and block pushing of commits that contain secrets.)
To make that work, you'd need to script some pieces: in a pre-receive hook, run noseyparker scan
on the received content, and then perhaps noseyparker report -f json
, followed by some test in the pre-receive hook that would cause it to fail if there were any Nosey Parker findings in the JSON output. I've not written such a thing myself.
One thing you would want to do if you set up a mechanism like this is specify a custom ruleset to only enable rules that have essentially no false positives, as you don't want to spuriously be blocking developer's commits. This mechanism is not well documented, but it involves writing a YAML file with the list of rule IDs that you want to enable, and then invoking noseyparker scan --rules-path YOUR_YAML_FILE --ruleset YOUR_RULESET_NAME
.
See here for an example ruleset: https://github.com/praetorian-inc/noseyparker/blob/0cce95910be38058cc0cf00b548a892e3ed5dc35/crates/noseyparker/data/default/builtin/rulesets/default.yml
Let me know if you have questions about this and I will write up more documentation.
from noseyparker.
Hi @bradlarsen thanks a lot for the quick help/support.
from noseyparker.
Related Issues (20)
- Stabilize the JSON format HOT 9
- Produce statically-linked release binaries HOT 3
- Add an option to ignore invalid certificates when cloning Git repos HOT 8
- Add Homebrew package HOT 3
- Support Windows HOT 5
- trouble compiling on amazon linux 2 (with gcc10) and graviton arm HOT 4
- Create a Nosey Parker pre-commit hook
- Revise showing ETA and rates for progress bars HOT 5
- Add a man page on the rules format HOT 3
- Require Boost as a dependency instead of bundling it
- Update Homebrew formula to include manpages
- Rework multi-platform Docker builds in GitHub Actions HOT 1
- Update nix package
- Add documentation on custom rulesets
- Caching in GitHub Actions doesn't seem to be working right HOT 9
- Error: Failed to initialize resource limits: Operation not permitted (os error 1) HOT 2
- Release static binaries HOT 2
- [Bug] `--ignore` flag doesn't works for git url and local directory input HOT 5
- Sporadic test failure: `scan::appmaker::scan_workflow_from_git_url` HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from noseyparker.