d3zd3z / gosure Goto Github PK
View Code? Open in Web Editor NEWFile integrity implemented in Go
License: BSD 3-Clause "New" or "Revised" License
File integrity implemented in Go
License: BSD 3-Clause "New" or "Revised" License
Currently check
always verifies the latest revision. Add a flag so that it can also specify earlier versions from the surefile.
The current documentation is just barely an overview of how to use gosure. Expand this to include sample use cases, and a clearer overview.
The commands always scan from the current directory, and the -d
option is always ignored.
Trying to add code to scan the dir shows that other code assumes the scan is taking place in the current directory.
Hi - While doing a quick review after seeing the project on reddit, I found myself cringing at the use of MD5. While I understand that your indented use case is not specifically security related, using MD5 specifically excludes any security related use cases. Please consider a secure cipher like sha256.
Instead of just logging periodic progress messages, integrate the progress meter with the logging system. Overwrite the lines unless something is printed. Look to how restic does this for inspiration.
The initial scan can take time with large filesystems (and cold caches). Print progress during this scan so the program feels like it is still working.
Encountering a file that can be statted but not read panics with "panic: Attribute sha1 is empty" when trying to write the output.
Thoughts are to make the encoder/decoder able to skip the empty attribute, or output a blank sha1 (such as all zeros).
Gosure and friends (rsure, etc) all use SHA1 has the hash function. Since these programs are more oriented toward integrity and not security, it isn't that harmful to use a weaker hash function. But, the user may want to consider other tradeoffs between performance and robustness of the hash function. Maybe they want increased performance, and use something like siphash or xxhash.
Add some type of --exclude
option to support exclusion.
One complication with this is that if it is specified differently on each run, it can appear that files and directories are added when it was just the exclusion that changed. One possibility is to put the exclusion into the datafile and reuse it on subsequent updates.
Use something like build.go from restic to make it easier for packagers and other non-go developers to build gosure.
If a directory has read by not 'x' permission, it is silently ignored. Perhaps this should print a warning at least.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.