Comments (8)
Another thought: something I see as a rough edge of the pre-commit workflow is having to either have a Rust setup or have installed ripsecrets through something else, e.g. Homebrew. Pre-commit knows how to setup a Python environment. What if there was a simple PyO3 wrapper around ripsecrets as a library, and ripsecrets published Python packages to PyPI? That would eliminate the Rust compile step and alleviate the prerequisite. The exchange would be more setup and care for ripsecrets, but automatable.
from ripsecrets.
Seems like there is some discussion about previous solutions: pre-commit/pre-commit#1453
from ripsecrets.
If @sirwart were to list this crate on crates.io, we could use cargo binstall and use a system
language pre-commit hook. This would considerably reduce dev container image build time or complexity of fetching pre-build binaries.
cargo binstall ripsecrets
INFO resolve: Resolving package: 'ripsecrets'
ERROR Fatal error:
× For crate ripsecrets: crates.io API error for ripsecrets: could not GET https://crates.io/api/v1/crates/ripsecrets: HTTP status client error (404 Not Found) for url (https://crates.io/api/v1/crates/ripsecrets)
├─▶ crates.io API error for ripsecrets: could not GET https://crates.io/api/v1/crates/ripsecrets: HTTP status client error (404 Not Found) for url (https://crates.io/api/v1/crates/ripsecrets)
├─▶ could not GET https://crates.io/api/v1/crates/ripsecrets: HTTP status client error (404 Not Found) for url (https://crates.io/api/v1/crates/ripsecrets)
╰─▶ HTTP status client error (404 Not Found) for url (https://crates.io/api/v1/crates/ripsecrets)
from ripsecrets.
See also: cargo-bins/cargo-binstall#3
from ripsecrets.
That's a good point, I think you could even just publish the existing rust binary as a python wheel.
from ripsecrets.
@bgianfo does publishing the binary to crates.io + system hook solve the problem for you? I have a visceral reaction to publishing as a Python library since one of the reasons I created ripsecrets was because at my previous job I couldn't commit because my system Python install was borked that was preventing the secret detector from running.
from ripsecrets.
@sirwart Following #85, the release Actions workflow now includes publishing to crates.io. Would you be willing to release a patch version to make the crate available?
from ripsecrets.
@bgianfo, @colindean sirwart has published ripsecrets to crates.io as ripsecrets. You should be unblocked if you want to use cargo binstall
.
from ripsecrets.
Related Issues (20)
- Finalize pre-commit configuration HOT 4
- What kind of secret that ripsecrets can find out HOT 4
- Consider supporting BIND9 config format
- Running cargo install downloads sentry submodule HOT 4
- Bug: Long secrets are not ignored
- Feature request: Allow global .secretsignore
- `.secretsignore` without `[secrets]` isn’t used
- FR: Consider adding gitlab private token pattern. HOT 3
- Check against SEDATED regexes for more
- Inconsistent behavior on secretsignore HOT 2
- It doesn't work HOT 9
- Blockers to 1.0.0? HOT 1
- Does not work in Windows
- Include a manpage in release artifacts HOT 1
- Handle multi-platform releases HOT 3
- Catch Azure SAS tokens in URLs? HOT 2
- Publish on crates.io HOT 4
- support quay robot token pattern HOT 3
- not that fast.. show benchmarks HOT 2
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 ripsecrets.