question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

More audit information: package age

See original GitHub issue

Is your feature request related to a problem? Please describe.

Not a problem per se, more of a nice-to-have: in addition to the current audit information I think it would be useful to be alerted of “older” packages. For example, if a required package version was uploaded more than N months ago, where N could be a command-line option. Perhaps there is a more recent update available, but perhaps there isn’t in which case I’d like to be alerted that the package is potentially stale/unmaintained.

Describe the solution you’d like

For example, running pip-audit --warn-aged 12 would list packages whose metadata entry upload_time_iso_8601 is older than a year. I could then check for updates, or consider dropping the package if I suspect it’s not maintained anymore.

Describe alternatives you’ve considered

Manual checking repos, or writing a custom script which fetches that data.

Additional context

This is an attempt to weed out package dependencies that may cause issues, e.g. because packages have become stale.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
jenstroegercommented, Sep 5, 2022

I’d like to use this issue to scribble down thoughts & ideas, and to keep the conversation going. @woodruffw, unless perhaps you’d like to move the conversation to a more suitable place (e.g. the Python Ideas board).

Assuming the user is online when running pip-audit then for some/many packages the code repository should be available, e.g.

> curl -s https://pypi.org/pypi/Sphinx/5.1.1/json | jq .info.project_urls.Code
"https://github.com/sphinx-doc/sphinx"

Scraping the repository would then give us interesting data points which would help to build some form of “reputation score”. For example:

  • Date of the last commit (docs) and the commit frequency indicates whether a repository is “active”
  • The run results (docs) indicate whether the last commit passed CI
  • The number of open issues (docs), their dates and discussion frequency indicates whether a repository receives attention
  • Pull requests (docs), their dates and discussions and closing frequency indicates a code velocity, and if correlated with issues, might indicate whether a package is maintained

Now I understand that this isn’t directly related to security auditing for known vulnerabilities, but I’d argue that an unmaintained package is by definition a liability. Based on that, I’d also argue that a poorly maintained package with lower code/CI/CD quality also poses a risk.

Projects like Scorecard address this somewhat (e.g. by generating a “maintained” score) but it’s not specifically targeted for Python package audits. I’ve not noodled through more/other/related projects yet, either…

1reaction
woodruffwcommented, Aug 10, 2022

Makes sense!

Another hiccup we’ll want to consider: package age may not be easily available from all dependency sources, e.g. pip-audit with no arguments, meaning “audit the current environment” rather than “pull down metadata from PyPI”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Federal Audit Clearinghouse (FAC) - Census Bureau
Form SF-SAC contains general information on the auditee and auditor, audit information on the entity's financial statements, and information on ...
Read more >
Retired & Annuitant Pay Processing: How Long Does It Take?
If you are a Gray Area Reservist turning 60 years of age, your first retired pay should be processed in 30 to 45...
Read more >
DBMS_AUDIT_MGMT - Oracle Help Center
The DBMS_AUDIT_MGMT package provides subprograms to manage audit trail records. These subprograms enable audit administrators to manage the various audit trail ...
Read more >
Topic No. 654 Understanding Your CP75 or CP75A Notice ...
You received this notice because the IRS is auditing your tax return. We're asking for information to verify items you claimed on your...
Read more >
Manage audit log retention policies - Microsoft Learn
Audit log retention policies are part of the new Microsoft Purview ... See the More information section in this article for a list...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found