Skip to content

Commit

Permalink
Fix typographical errors
Browse files Browse the repository at this point in the history
- Fixes #62

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
  • Loading branch information
techalchemy committed Dec 17, 2020
1 parent 9041250 commit af53c66
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ optional arguments:
-v, --verbose enable verbose messages
-p {critical,high,medium,all}, --priority {critical,high,medium,all}
filter output by CVE priority
--db UBUNTU_DB_FILE Specify an Ubuntu vulnerability datbase file to use instead
--db UBUNTU_DB_FILE Specify an Ubuntu vulnerability database file to use instead
of downloading the latest from people.canonical.com.
-m MANIFEST_FILE, --manifest MANIFEST_FILE
scan a package manifest file instead of the local system
Expand Down Expand Up @@ -213,7 +213,7 @@ You can run the automated test suite by running
```

An HTML code coverage report will be generated at `./htmlcov`. You can view
this with any web browser (e.g. `firefox ./htmlcov/index.html`).
this with any web browser (e.g. `Firefox ./htmlcov/index.html`).

### Version numbers
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Expand Down
4 changes: 2 additions & 2 deletions cvescan/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def main():
error_exit(f"Failed to determine the correct Ubuntu codename -- {err}")
except DistribIDError as di:
error_exit(
f"Invalid linux distribution detected, CVEScan must be run on Ubuntu -- {di}"
f"Invalid Linux distribution detected, CVEScan must be run on Ubuntu -- {di}"
)
except PkgCountError as pke:
error_exit(f"Failed to determine the local package count -- {pke}")
Expand Down Expand Up @@ -238,7 +238,7 @@ def wrapper(*args, **kwargs):

@spin(
"Downloading Ubuntu vulnerability database...",
"Ubuntu vulnerability datbase successfully downloaded!",
"Ubuntu vulnerability database successfully downloaded!",
"Download Failed!",
)
def load_uct_data(opt, download_cache, target_sysinfo):
Expand Down
4 changes: 2 additions & 2 deletions cvescan/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

DB_ARG_NAME = "db"
DB_FILE_HELP = (
"specify an Ubuntu vulnerability datbase file to use instead of downloading the"
" latest from people.canonical.com."
"specify an Ubuntu vulnerability database file to use instead of downloading the"
" latest from people.canonical.com."
)

MANIFEST_ARG_NAME = "manifest"
Expand Down
6 changes: 3 additions & 3 deletions cvescan/local_sysinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ def get_lsb_release_info(self):
)
return self.get_lsb_release_info_from_file()

# Getting distro ID and codename from file beacuse the lsb_release python module
# is not available. The lsb_release module is not installed in the snap package
# because it causes the package to triple in size.
# Getting distribution ID and codename from file because the lsb_release python
# module is not available. The lsb_release module is not installed in the snap
# package because it causes the package to triple in size.
def get_lsb_release_info_from_file(self):
self.logger.debug(
"Attempting to read %s to determine DISTRIB_ID and DISTRIB_CODENAME"
Expand Down
7 changes: 4 additions & 3 deletions cvescan/output_formatters/syslog_output_formatter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List
from typing import List, Tuple

import cvescan.target_sysinfo as TargetSysInfo
from cvescan.output_formatters import AbstractOutputFormatter, JSONOutputFormatter
Expand All @@ -12,7 +12,7 @@ def __init__(self, opt, logger, json_output_formatter: JSONOutputFormatter):

def format_output(
self, scan_results: List[ScanResult], sysinfo: TargetSysInfo
) -> (str, int):
) -> Tuple[str, int]:
scan_results = self._filter_on_experimental(scan_results)

json_output, return_code = self.json_output_formatter.format_output(
Expand All @@ -25,6 +25,7 @@ def format_output(
stats = self._get_scan_stats(scan_results, sysinfo)

return (
f"{stats.fixable_vulns} vulnerabilites can be fixed by running `sudo apt upgrade`",
f"{stats.fixable_vulns} vulnerabilities can be fixed by running "
"`sudo apt upgrade`",
return_code,
)
2 changes: 1 addition & 1 deletion tests/output_formatters/test_syslog_output_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_returns_json_light():
formatter = MockSyslogOutputFormatter(opt, null_logger(), MockJSONOutputFormatter())
(results_msg, return_code) = formatter.format_output([], MockSysInfo())

assert results_msg == "5 vulnerabilites can be fixed by running `sudo apt upgrade`"
assert results_msg == "5 vulnerabilities can be fixed by running `sudo apt upgrade`"
assert return_code == 0


Expand Down

0 comments on commit af53c66

Please sign in to comment.