Skip to content

Commit

Permalink
convert md to html; remove company guideline from codelens for secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX committed Apr 3, 2024
1 parent c1d30e9 commit da855bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions src/panels/violation/violation-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ const _enrichSecretDetectionForRender = (detection: SecretDetection): SecretDete
''
);

if (detection.detection_details.custom_remediation_guidelines) {
const markdownConverter = new Converter();
detection.detection_details.custom_remediation_guidelines =
markdownConverter.makeHtml(detection.detection_details.custom_remediation_guidelines);
}

return detection;
};

Expand Down
4 changes: 0 additions & 4 deletions src/services/scanners/SecretScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ const detectionsToDiagnostics = async (
message += `In file: ${detection.detection_details.file_name}\n`;
message += `Secret SHA: ${detection.detection_details.sha512}`;

if (detection.detection_details.custom_remediation_guidelines) {
message += `\nCompany Guideline: ${detection.detection_details.custom_remediation_guidelines}`;
}

const diagnostic = new vscode.Diagnostic(
new vscode.Range(startPosition, endPosition),
message,
Expand Down

0 comments on commit da855bc

Please sign in to comment.