Merge ~alexmurray/ubuntu-security-tools:uaudit-rubocop into ubuntu-security-tools:master

Proposed by Alex Murray
Status: Merged
Merged at revision: 8e9594106615e826384d89e96fcac01bc59d229c
Proposed branch: ~alexmurray/ubuntu-security-tools:uaudit-rubocop
Merge into: ubuntu-security-tools:master
Diff against target: 30 lines (+10/-0)
2 files modified
audits/jira.template (+1/-0)
audits/uaudit (+9/-0)
Reviewer Review Type Date Requested Status
Mark Esler Approve
Ubuntu Security Team Pending
Review via email: mp+437182@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mark Esler (eslerm) wrote :

This looks great Alex! Thank you.

rubocop is a fairly verbose code linter, so I recommend adding `--only Security`.

review: Approve
Revision history for this message
Alex Murray (alexmurray) wrote :

Thanks Mark - I think I might also add --enable-pending-cops too in this case to try and get as much coverage as possible from the security linters.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/audits/jira.template b/audits/jira.template
index 0a94a9a..82c83ff 100644
--- a/audits/jira.template
+++ b/audits/jira.template
@@ -9,6 +9,7 @@ $scc
9- $coverity coverity defects9- $coverity coverity defects
10- $bandit warnings from bandit10- $bandit warnings from bandit
11- $brakeman brakeman defects11- $brakeman brakeman defects
12- $rubocop rubocop defects
12- $flawfinder flawfinder defects13- $flawfinder flawfinder defects
13- $cppcheck warnings from cppcheck14- $cppcheck warnings from cppcheck
14- $shellcheck warnings from shellcheck15- $shellcheck warnings from shellcheck
diff --git a/audits/uaudit b/audits/uaudit
index af32fd5..3d0300b 100755
--- a/audits/uaudit
+++ b/audits/uaudit
@@ -165,6 +165,15 @@ static_analysis_tools = [
165 cmd_end=["."],165 cmd_end=["."],
166 summary=["sed", "/^Processed/q", OUTPUT_FILE],166 summary=["sed", "/^Processed/q", OUTPUT_FILE],
167 ),167 ),
168 StaticAnalysisTool(
169 "rubocop",
170 source=StaticAnalysisToolSource.DEB,
171 cmd_start=["rubocop", "--no-color", "--enable-pending-cops", "--only", "Security"],
172 cmd_json=["--format", "json"],
173 cmd_txt=["--format", "emacs"],
174 cmd_end=["."],
175 summary=["grep", "-c", "^\\./", OUTPUT_FILE]
176 ),
168]177]
169178
170179

Subscribers

People subscribed via source and target branches