Skip to content

Commit

Permalink
Fixes #62 - packages in the database feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
csgillespie committed May 18, 2021
1 parent d5a4688 commit ebda4a3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: oysteR
Title: Scans R Projects for Vulnerable Third Party Dependencies
Version: 0.1.3
Version: 0.1.4
Authors@R:
c(person(given = "Jeffry",
family = "Hesse",
Expand Down
10 changes: 7 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# oysteR 0.1.3 _2021-11-03_
* Interal: Return missing values as `NA`'s (see #59)
# oysteR 0.1.2 _2021-26-02_
# oysteR 0.1.4 _2021-05-18_
* Bug: Incorrectly states how many packages were found in the database (see #62)

# oysteR 0.1.3 _2021-03-11-_
* Internal: Return missing values as `NA`'s (see #59)

# oysteR 0.1.2 _2021-02-26_
* Feature: Add `audit_conda()` functions
* Feature: Add Josiah Parry as an author
* Feature: Handle missing versions in a nice way
Expand Down
4 changes: 1 addition & 3 deletions R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License."

globalVariables(c("no_of_pkgs", "no_of_vul", "no_of_vul_comps", "pkgs_in_sona"))
globalVariables(c("no_of_pkgs", "no_of_vul", "no_of_vul_comps"))
audit_verbose = function(results) {
no_of_pkgs = nrow(results)
no_of_vul_comps = sum(results$no_of_vulnerabilities != 0, na.rm = TRUE)
no_of_vul = sum(results$no_of_vulnerabilities, na.rm = TRUE)
pkgs_in_sona = sum(!is.na(results$description))

cli::cli_h2("Vulnerability overview")
cli::cli_alert_info("{no_of_pkgs} package{?s} w{?as/ere} scanned")
cli::cli_alert_info("{pkgs_in_sona} package{?s} w{?as/ere} found in the Sonatype database")
cli::cli_alert_info("{no_of_vul_comps} package{?s} had known vulnerabilit{?y/ies}")
cli::cli_alert_info("A total of {no_of_vul} known vulnerabilit{?y/ies} w{?as/ere} identified")
cli::cli_alert_info("See https://github.com/sonatype-nexus-community/oysteR/ for details.")
Expand Down

0 comments on commit ebda4a3

Please sign in to comment.