Skip to content

feat: scan DSH plugins during checkup - #126

Merged
Mr-Lucky merged 3 commits into
mainfrom
feat/checkup-dsh-plugin-scan
Sep 2, 2026
Merged

feat: scan DSH plugins during checkup#126
Mr-Lucky merged 3 commits into
mainfrom
feat/checkup-dsh-plugin-scan

Conversation

@Mr-Lucky

@Mr-Lucky Mr-Lucky commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Discover installed DSH plugin directories and include them in local health checkup code-safety scans.
  • Fold DSH findings into health scores, reports, CLI output, and audit records.
  • Tolerate transient files that disappear while enforcing GitHub source acquisition limits.
  • Add coverage for DSH discovery/scanning, report and score generation, CLI integration, and checkout race conditions.

Type

  • Bug fix
  • New feature / detection rule
  • Refactoring
  • Documentation

Testing

  • npm run build passes
  • npm test passes (610 tests)
  • Manually tested the change

Related Issues

Closes #

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

AgentGuard PR Review

I found a couple of concrete regressions in the DSH checkup changes.

  1. severity: high — src/cli.ts / src/feed/dsh-discovery.ts / src/tests/cli-checkup.test.ts

    • What can go wrong: the CLI now counts and scans any direct dependency whose package directory exists, and only excludes @goplus/agentguard based on the installed package’s self-reported package.json name. A malicious or tampered package can rename itself to @goplus/agentguard to evade both discovery and scan, so a risky plugin can be silently skipped.
    • Concrete fix: exclude the managed package by the dependency coordinate from the profile manifest (dependencyName === '@goplus/agentguard') before any filesystem lookup, and do not use the installed package’s name field for trust decisions.
  2. severity: medium — src/checkup/dsh.ts

    • What can go wrong: DSH plugin scan results are now converted to code-safety findings using per-finding severity, but the score deduction is still capped at 100 only after summing all deductions. If a single plugin produces many findings, the code-safety score can underflow before clamping and distort downstream scoring/tiers compared with the previous model.
    • Concrete fix: clamp per-plugin or per-finding deductions incrementally, or compute deductions from a bounded normalized model so the score cannot be driven far below zero before the final clamp.

@Mr-Lucky
Mr-Lucky merged commit c32996d into main Sep 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants