Skip to content

Commit

Permalink
Merge pull request #1881 from snyk/refactor/iac-documentation-url-in-…
Browse files Browse the repository at this point in the history
…outputs

refactor: iac documentation url in outputs
  • Loading branch information
almog27 committed May 6, 2021
2 parents 7bc9229 + be34e5c commit 9c6dcfd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
Expand Up @@ -65,6 +65,7 @@ function formatScanResult(
},
severity: policy.severity,
lineNumber,
documentation: `https://snyk.io/security-rules/${policy.publicId}`,
};
});

Expand Down
1 change: 1 addition & 0 deletions src/cli/commands/test/iac-output.ts
Expand Up @@ -209,6 +209,7 @@ export function extractReportingDescriptor(
},
properties: {
tags: ['security', `${issue.type}/${issue.subType}`],
documentation: issue.documentation,
},
};
});
Expand Down
1 change: 1 addition & 0 deletions src/lib/snyk-test/iac-test-result.ts
Expand Up @@ -10,6 +10,7 @@ export interface AnnotatedIacIssue {
type: string;
subType: string;
path: string[];
documentation: string;
// Legacy fields from Registry, unused.
name?: string;
from?: string[];
Expand Down
1 change: 1 addition & 0 deletions test/acceptance/cli-test/iac/cli-test.iac-utils.ts
Expand Up @@ -303,6 +303,7 @@ function generateDummyIssue(severity): AnnotatedIacIssue {
subType: 'Deployment',
path: [],
lineNumber: 1,
documentation: 'https://snyk.io/security-rules/SNYK-CC-K8S-1',
};
}

Expand Down
Expand Up @@ -80,6 +80,7 @@ export const expectedFormattedResults = {
},
severity: anotherPolicyStub.severity,
lineNumber: 3,
documentation: `https://snyk.io/security-rules/${anotherPolicyStub.publicId}`,
},
],
projectType: 'k8sconfig',
Expand Down

0 comments on commit 9c6dcfd

Please sign in to comment.