Skip to content

Feature: Decision engine (allow/deny/ask) #4

@ProduktEntdecker

Description

@ProduktEntdecker

Overview

Determine whether to allow, deny, or ask user confirmation based on vulnerability scan results.

Depends On

Acceptance Criteria

  • DENY if any CRITICAL or HIGH severity vulnerabilities found
  • ASK if MEDIUM severity vulnerabilities found
  • ALLOW if no vulnerabilities or only LOW severity
  • Include vulnerability details in denial reason
  • Suggest fixed version in denial message
  • Format output as valid hook JSON response

Decision Matrix

Severity Decision Action
CRITICAL deny Block with details
HIGH deny Block with details
MEDIUM ask Prompt user
LOW allow Proceed with warning
None allow Proceed silently

Output Examples

// Deny
{
  "hookSpecificOutput": {
    "hookEventName": "PreToolUse",
    "permissionDecision": "deny",
    "permissionDecisionReason": "🚨 lodash@4.17.0 has 2 HIGH vulnerabilities:\n- CVE-2021-23337: Prototype Pollution\n- CVE-2020-8203: Prototype Pollution\n\n💡 Update to lodash@4.17.21"
  }
}

Priority: P1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions