Comments (2)
By the way, (because I do not want to create many issues), is it expected that subsequent skjold calls every time take 3 minutes? Why is it so slow? Without changing files calling the command two times takes 6 minutes, three times - 9 minutes, etc.
Can cache be improved so if skjold is called again without a big pause and without changed files, then it will not take again 3 minutes? For example, if files are the same and less than N minutes from the previous scan, then skip some checks.
Anyway, 3 minutes on every call is very slow. I will need to inspect the source code to see what is happening here...
from skjold.
👋 Thanks for taking the time to raise those issues and sorry for the late reply! :)
RE "Warning: No advisory sources configured!": Great point! The logic could definitely use a refactor to not print a warning when specifying sources via the CLI. I'm happy to review/merge a PR if you want to tackle it?
RE "Caching": Without more information it is hard to tell whether things should be faster or not. Using all sources at once might also a little bit of overkill as there is probably a lot of overlap between them. Either way skjold
was definitely not optimized for speed e.g. the gemnasium
source reads and parses all YAML files from an archive (https://github.com/twu/skjold/blob/master/src/skjold/sources/gemnasium.py#L115) on every invocation etc. It has a very basic (and hopefully working 😅) caching mechanism built in though (See https://github.com/twu/skjold/blob/master/src/skjold/core.py#L128-L136 and https://github.com/twu/skjold/blob/master/src/skjold/core.py#L93-L97).
I'm currently a little busy with work/private life but I will try to give it a deeper look this weekend along with any bugs or issues you find along the way. I'm also happy to review/merge any PRs tackling bugs if you are up for it? :)
P.S.: I also have mentioning this in the README.md
on my TODO list as well but just so you are aware: skjold
was created in a time way before PyPA released pip-audit
which has way smarter and more dedicated people working on it (e.g. Dustin Ingram,...). I'm assuming they optimized for speed already with the amount of people using it. It might also be a far superior option depending on your use case :)
from skjold.
Related Issues (20)
- Pre-commit hooks only checks files in root of repo HOT 2
- Pre-commit hook fails if multiple lock or requirements files are modified at same time HOT 4
- Drop Python `3.6.x` support.
- How do you call audit programatically? HOT 1
- Links to pyup.io point to 404 page HOT 2
- Inconsequent ignoring HOT 1
- pypa audits raise ScannerError: mapping values are not allowed here HOT 2
- feat: set cache directory via environment variable HOT 1
- Please bump to packaging major 22 if possible or loosen spec up
- Invalid specifier error HOT 7
- pypa: TypeError: string indices must be integers, not 'str' HOT 3
- Invalid Specifier on Gemnasium ranges HOT 1
- Display helpful message if Github Token is not found/set.
- Error parsing a github source, on 0.4.0 HOT 1
- Latest OSV schema update breaks `pypa` and `osv` sources. HOT 1
- Latest schema update breaks `pypa` source. HOT 2
- False Positive for Patched pyyaml From `osv` Source HOT 2
- Enable Python `"3.10"` in workflows.
- checking `pyspark` against `gemnasium` throws an exception HOT 1
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 skjold.