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

respect verbosity from action to call grype #82

Merged
merged 1 commit into from Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion dist/index.js
Expand Up @@ -480,11 +480,15 @@ async function run() {
var version = core.getInput("grype-version");
const billOfMaterialsPath = "./anchore-reports/content.json";
const SEVERITY_LIST = ["negligible", "low", "medium", "high", "critical"];
let cmdArgs = [];
console.log(billOfMaterialsPath);
if (debug.toLowerCase() === "true") {
debug = "true";
cmdArgs = [`-vv`, `-o`, `json`];

} else {
debug = "false";
cmdArgs = [`-o`, `json`];
}

if (failBuild.toLowerCase() === "true") {
Expand Down Expand Up @@ -528,7 +532,6 @@ async function run() {
// Run the grype analyzer
let cmdOutput = "";
let cmd = `${grypeBinary}`;
let cmdArgs = [`-vv`, `-o`, `json`];
if (severityCutoff != "") {
cmdArgs.push("--fail-on");
cmdArgs.push(severityCutoff.toLowerCase());
Expand Down
5 changes: 4 additions & 1 deletion index.js
Expand Up @@ -473,11 +473,15 @@ async function run() {
var version = core.getInput("grype-version");
const billOfMaterialsPath = "./anchore-reports/content.json";
const SEVERITY_LIST = ["negligible", "low", "medium", "high", "critical"];
let cmdArgs = [];
console.log(billOfMaterialsPath);
if (debug.toLowerCase() === "true") {
debug = "true";
cmdArgs = [`-vv`, `-o`, `json`];

} else {
debug = "false";
cmdArgs = [`-o`, `json`];
}

if (failBuild.toLowerCase() === "true") {
Expand Down Expand Up @@ -521,7 +525,6 @@ async function run() {
// Run the grype analyzer
let cmdOutput = "";
let cmd = `${grypeBinary}`;
let cmdArgs = [`-vv`, `-o`, `json`];
if (severityCutoff != "") {
cmdArgs.push("--fail-on");
cmdArgs.push(severityCutoff.toLowerCase());
Expand Down