Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying database last update date. #311

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

nicholasks
Copy link
Contributor

@nicholasks nicholasks commented Aug 26, 2020

This will allow safety users to check safety DB last update date.

The date is obtained from the field timestamp on the safety db metadata ($meta).

image

@codecov
Copy link

codecov bot commented Jan 9, 2021

Codecov Report

Merging #311 (fe0a3df) into master (b289752) will decrease coverage by 0.11%.
The diff coverage is 63.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #311      +/-   ##
==========================================
- Coverage   71.59%   71.48%   -0.12%     
==========================================
  Files           8        8              
  Lines         514      526      +12     
==========================================
+ Hits          368      376       +8     
- Misses        146      150       +4     
Impacted Files Coverage Δ
safety/cli.py 56.63% <0.00%> (ø)
safety/formatter.py 55.12% <40.00%> (-1.17%) ⬇️
safety/safety.py 93.33% <100.00%> (+0.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b289752...fe0a3df. Read the comment docs.

@@ -68,14 +68,15 @@ def check(key, db, json, full_report, bare, stdin, files, cache, ignore, output,
]
proxy_dictionary = get_proxy_dict(proxyprotocol, proxyhost, proxyport)
try:
vulns = safety.check(packages=packages, key=key, db_mirror=db, cached=cache, ignore_ids=ignore, proxy=proxy_dictionary)
vulns, db_last_update = safety.check(packages=packages, key=key, db_mirror=db, cached=cache, ignore_ids=ignore, proxy=proxy_dictionary)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid that this is changing our internal code API for Safety. People might be relying on this call and will get unexpected tuple as result instead of a single value. Is there a way to handle this without a breaking change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants