Overview
Vulnerability server actions provide complete CRUD functionality with built-in team isolation, approval workflows, and assignment capabilities. All actions are located insrc/app/actions/vulnerabilities.ts.
getVulnerabilities
Retrieve all vulnerabilities visible to the current user.- Admins: See all team vulnerabilities regardless of approval status
- Contributors/Viewers: See approved vulnerabilities + their own pending submissions
Operation success status
Array of vulnerability objects with related data:
dread: DREAD scoring objectstride: STRIDE threat modeluser: Creator information (name, email)
Error message if operation failed
getVulnerability
Retrieve a single vulnerability by ID.Unique vulnerability identifier
- Strict team isolation enforced
- Non-admins can only view approved vulnerabilities or their own submissions
- Returns “Unauthorized: Cross-tenant access denied” for out-of-team access
Vulnerability object including:
dread: DREAD scoringstride: STRIDE analysisassignedTo: Assigned user details (id, name, email)
createVulnerability
Create a new vulnerability record.Vulnerability title/summary
Detailed vulnerability description
Severity classification
Optional CVE identifier. If provided, VulnTrack will:
- Fetch data from VulnCheck API (if configured)
- Fallback to NIST NVD API
- Auto-populate CVSS scores, references, and affected systems
- Generate DREAD scores based on CVSS metrics
Optional DREAD scoring object with numeric values (1-10):
damagereproducibilityexploitabilityaffectedUsersdiscoverability
Optional STRIDE threat model with boolean flags:
spoofingtamperingrepudiationinformationDisclosuredenialOfServiceelevationOfPrivilege
- Admin-created vulnerabilities are auto-approved
- Contributor/Viewer submissions are set to
PENDINGstatus - Status is always
OPENon creation - If CVE ID provided, enriches data from external APIs
- Prevents duplicate CVE imports within the same team
- Auto-generates default mitigation steps
- Derives asset name from affected systems
The created vulnerability object
updateVulnerability
Update an existing vulnerability.Vulnerability ID to update
Update payload with fields:
titledescriptionseveritystatusdread(optional)stride(optional)
- Must be the vulnerability owner OR an admin
- Must belong to the same team
- Cannot update vulnerabilities from other teams
- Revalidates
/dashboard/vulnerabilities - Revalidates
/dashboard/vulnerabilities/{id}
deleteVulnerability
Delete a vulnerability and all related data.Vulnerability ID to delete
- Only the vulnerability owner can delete
- Admins do not have delete permissions (security measure)
- DREAD scores
- STRIDE assessments
- Comments
- Logs deletion event with vulnerability title
- Records user who performed the deletion
approveVulnerability
Approve a pending vulnerability (admin only).Vulnerability ID to approve
- Admin role required
- Admin must belong to the same team as the vulnerability
- Changes
approvalStatusfromPENDINGtoAPPROVED - Makes vulnerability visible to all team members
- Sends notification to the creator
updateVulnerabilityStatus
Update only the status field of a vulnerability.Vulnerability ID
New status value:
OPENIN_PROGRESSRESOLVEDWONT_FIX
- Only the vulnerability owner can update status
assignVulnerability
Assign a vulnerability to a team member (admin only).Vulnerability ID to assign
User ID to assign to, or
null to unassign- Admin role required
- Assignee must be in the same team
- Creates an in-app notification for the assignee
- Sends an email notification with:
- Vulnerability title
- Direct link to the vulnerability
- Assignment details
getTeamMembers
Retrieve all members of the current user’s team.Array of user objects with:
idnameemailrole
- Populating assignment dropdowns
- Team member lists
- Permission checks
Example: Complete Workflow
Next Steps
Scoring
Calculate DREAD and STRIDE scores
Comments
Add comments and collaboration