Skip to content

Add safe rules for pnpm and Yarn package caches #155

Description

@Muawiya-contact

Goal

Add rules for common pnpm and Yarn cache folders.

Diskern already has npm cache coverage. pnpm and Yarn users should get the same safe, clear classification where the cache is regenerated by the package manager.

Suggested starting point

Rules live here:

crates/diskern-core/rules/base.json

Existing npm cache rule can be used as the model:

{
  "id": "npm-cache",
  "patterns": ["**/.npm/_cacache/**"],
  "category": "package_manager_cache",
  "verdict": "safe",
  "description": "npm's download cache. Re-fetched on demand; removing it only makes the next install download packages again."
}

Please research the common pnpm/Yarn cache paths and add conservative rules only.

Acceptance criteria

  • Adds pnpm and/or Yarn cache rules.
  • Uses package_manager_cache and a safe/review verdict only when the path is clearly cache.
  • Adds or updates tests in crates/diskern-core/src/rules.rs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enginediskern-core: scanner, rules, risk, graph, reportgood first issueGood for newcomershelp wantedExtra attention is neededlevel: beginnerSmall and well-scoped; no deep context neededpriority: lowNice to haverulesThe safety rules database

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions