Skip to content

Commit 2e836e8

Browse files
bsamuels453claude
andcommitted
feat(findings): add resolution emojis, refine details panel, bump to 1.3.2
Add ✅/❌ emoji indicators for true/false positive resolutions in the resolved findings tree. Shrink default description rows to 2, clean up recommendation template whitespace, wire dropdown input events for non-persistent field changes, and force-install in install.sh. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ccc811c commit 2e836e8

File tree

8 files changed

+35
-9
lines changed

8 files changed

+35
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ You can quickly navigate through all partially audited regions in your workspace
9090

9191
You can fill detailed information about a finding by clicking on it in the _List of Findings_ view in the sidebar. The respective _Finding Details_ panel will open, where you can fill the information.
9292
The panel also shows a read-only provenance field (defaulting to "human"), with the author's username shown next to it.
93-
The Description, Exploit Scenario, and Recommendations fields auto-expand as you type, up to half the panel height, then scroll.
93+
The Description, Exploit Scenario, and Recommendations fields auto-expand as you type, starting at roughly two lines tall, up to half the panel height, then scroll.
9494
The action buttons at the top let you triage findings (True/False Positive), resolve notes, or open a GitHub issue.
9595
Resolution changes are applied through those action buttons.
9696

@@ -111,7 +111,7 @@ In the _List of Findings_ view, multi-location entries are collapsed by default;
111111

112112
### Resolve and Restore
113113

114-
Notes can be resolved from the _List of Findings_ panel. Findings are triaged instead: mark them as `True Positive` or `False Positive` from the same panel. Resolved notes and triaged findings are no longer highlighted in the editor but remain visible in the _Resolved Findings_ panel with a status badge. You can restore any resolved entry by clicking the corresponding `Restore` button in the _Resolved Findings_ panel.
114+
Notes can be resolved from the _List of Findings_ panel. Findings are triaged instead: mark them as `True Positive` or `False Positive` from the same panel. Resolved notes and triaged findings are no longer highlighted in the editor but remain visible in the _Resolved Findings_ panel with a status badge and a ✅/❌ indicator for true/false positives. You can restore any resolved entry by clicking the corresponding `Restore` button in the _Resolved Findings_ panel.
115115

116116
![Resolve and Restore](media/readme/gifs/resolve_finding.gif)
117117

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
npx vsce package
22
mv weaudit-*.vsix weaudit.vsix
3-
code --install-extension weaudit.vsix
3+
code --install-extension weaudit.vsix --force

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "weaudit",
33
"displayName": "weAudit",
44
"description": "Bookmark findings and quickly navigate to areas of interest in the codebase",
5-
"version": "1.3.1",
5+
"version": "1.3.2",
66
"publisher": "trailofbits",
77
"author": "Trail of Bits",
88
"categories": [],

src/panels/findingDetails.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
</vscode-dropdown>
6161
</div>
6262
</div>
63-
<div class="detailsDiv"><vscode-text-area placeholder="The finding details" id="description-area" rows="5">Description</vscode-text-area></div>
63+
<div class="detailsDiv"><vscode-text-area placeholder="The finding details" id="description-area" rows="2">Description</vscode-text-area></div>
6464
<div class="detailsDiv"><vscode-text-area placeholder="The exploit scenario" id="exploit-area" rows="2">Exploit Scenario</vscode-text-area></div>
65-
<div class="detailsDiv"><vscode-text-area value="Short term, \nLong term,\n" id="recommendation-area" rows="2">Recommendations</vscode-text-area></div>
65+
<div class="detailsDiv"><vscode-text-area value="Short term,\nLong term," id="recommendation-area" rows="2">Recommendations</vscode-text-area></div>
6666
</div>

src/resolvedFindings.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,28 @@ function getResolutionBadge(entry: FullEntry): string {
2727
return "UNCLASSIFIED";
2828
}
2929

30+
/**
31+
* Returns an emoji that reflects the resolution status for resolved findings.
32+
* @param entry The resolved entry to label.
33+
* @returns An emoji for the resolution, or an empty string when not applicable.
34+
*/
35+
function getResolutionEmoji(entry: FullEntry): string {
36+
if (entry.entryType !== EntryType.Finding) {
37+
return "";
38+
}
39+
40+
if (entry.details?.resolution === EntryResolution.TruePositive) {
41+
return "✅";
42+
}
43+
44+
const resolutionValue = String(entry.details?.resolution);
45+
if (entry.details?.resolution === EntryResolution.FalsePositive || resolutionValue === "False Positive" || resolutionValue === "False Negative") {
46+
return "❌";
47+
}
48+
49+
return "";
50+
}
51+
3052
export class ResolvedEntriesTree implements vscode.TreeDataProvider<FullEntry> {
3153
private resolvedEntries: FullEntry[];
3254

@@ -59,7 +81,8 @@ export class ResolvedEntriesTree implements vscode.TreeDataProvider<FullEntry> {
5981
}
6082

6183
getTreeItem(entry: FullEntry): vscode.TreeItem {
62-
const label = entry.label;
84+
const resolutionEmoji = getResolutionEmoji(entry);
85+
const label = resolutionEmoji ? `${resolutionEmoji} ${entry.label}` : entry.label;
6386
const treeItem = new vscode.TreeItem(label, vscode.TreeItemCollapsibleState.None);
6487
if (entry.entryType === EntryType.Note) {
6588
treeItem.iconPath = new vscode.ThemeIcon("bookmark");

src/test/types.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe("types.ts", () => {
5555
assert.strictEqual(details.type, FindingType.Undefined);
5656
assert.strictEqual(details.description, "");
5757
assert.strictEqual(details.exploit, "");
58-
assert.strictEqual(details.recommendation, "Short term, \nLong term, \n");
58+
assert.strictEqual(details.recommendation, "Short term,\nLong term,");
5959
assert.strictEqual(details.resolution, EntryResolution.Open);
6060
assert.ok(details.provenance);
6161
if (typeof details.provenance !== "object" || details.provenance === null) {

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export function createDefaultEntryDetails(commitHash?: string): EntryDetails {
256256
type: FindingType.Undefined,
257257
description: "",
258258
exploit: "",
259-
recommendation: "Short term, \nLong term, \n",
259+
recommendation: "Short term,\nLong term,",
260260
resolution: EntryResolution.Open,
261261
provenance: {
262262
source: "human",

src/webview/findingDetailsMain.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,15 @@ function main(): void {
3838

3939
const severityDropdown = document.getElementById("severity-dropdown") as Dropdown;
4040
severityDropdown?.addEventListener("change", handlePersistentFieldChange);
41+
severityDropdown?.addEventListener("input", handleNonPersistentFieldChange);
4142

4243
const difficultyDropdown = document.getElementById("difficulty-dropdown") as Dropdown;
4344
difficultyDropdown?.addEventListener("change", handlePersistentFieldChange);
45+
difficultyDropdown?.addEventListener("input", handleNonPersistentFieldChange);
4446

4547
const typeDropdown = document.getElementById("type-dropdown") as Dropdown;
4648
typeDropdown?.addEventListener("change", handlePersistentFieldChange);
49+
typeDropdown?.addEventListener("input", handleNonPersistentFieldChange);
4750

4851
// for the text areas, we listen to to both the change and input events
4952
// on change events we persist the data into disk

0 commit comments

Comments
 (0)