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

refactor: iac documentation url in outputs #1881

Merged
merged 1 commit into from
May 6, 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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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