This document covers reporting a vulnerability in SlideRule, the tool's security model, and verifying the packages you install.
Only the latest release on nuget.org receives security fixes.
Report privately through GitHub security advisories. Do not open a public issue for a security report. You can expect an acknowledgment within 7 days.
SlideRule is a local analysis tool, and its threat model follows from that.
- It runs with your user privileges: as the
slideruleCLI, as a stdio MCP server your MCP client starts (sliderule mcp), or as the hook your agent runs (sliderule hook). It opens no network listener, makes no outbound calls and sends no telemetry.initrunsdotnet sln addanddotnet buildon the spec project it writes, and that build's restore downloads theSlideRulepackage from your NuGet sources. The xUnit adapter,SlideRule.Xunit, runs the same solution load inside your test process. - Apart from the build files a solution load can rewrite under
obj, it writes to your repository only when you run a command for that.renderwrites the managedAGENTS.mdblock, the per-directoryAGENTS.mdcards, and the diagram file that--diagramor the settings file names. It writes the model filesliderule.model.jsonwhen--modelis passed or the settings file setsrender.model. Once the file exists, everyrenderupdates it when its content changes, unless a project in the solution is missing or failed to load.baselinewrites the baseline files, andcheck --sarif <path>,--annotations <path>and--annotations-summary <path>write their reports to the paths given.initwrites a spec project and thesliderule.jsonsettings file, adds the project to the solution file and builds it.install-hookwrites.claude/settings.jsonat the root of the work tree. The MCP server has no tool that writes any of them, and the hook settings deny a coding agent thebaselinecommand. The hook andcheck --diff-baserun read-onlygitcommands in your repository (rev-parse,diff --name-onlyandstatus), and so doesarch_checkgiven adiffBase. The hook also runsgit worktree list --porcelainto find the other worktrees of the repository.check --sarif,initandinstall-hookrungit rev-parse --show-toplevelto find the repository's root. - Outside the repository it keeps its own state. Most commands that load a solution keep an extraction cache under
%LOCALAPPDATA%\SlideRule\cache, as the command-line reference describes, andSLIDERULE_CACHE_DIRmoves it. A--binlogyou pass is copied into that cache, unless--no-cacheis passed too. A binlog can contain whatever the build recorded, environment variables included, so treat the cache with the care you give the binlog. A run that the extraction cache serves only in part writes a solution filter to the temporary directory and deletes it after the load. The hook keeps per-session state undersliderule-hookin the temporary directory, or in the directorySLIDERULE_HOOK_STATE_DIRnames. In a clone of this repository, the MCP server's launcher copies the CLI build to~/.sliderule/mcp-run, whichSLIDERULE_MCP_RUN_ROOTmoves. - The MCP server writes a daily log to
%LOCALAPPDATA%\SlideRule\logs(the local application data folder on other platforms) and keeps the 7 newest files. A log can contain absolute paths and rule and violation text read from your solution, and it stays on the machine. The extraction cache contains names and absolute file paths read from your code. The hook's state files contain the paths of the changed code files in your working tree and the last warnings the hook reported. Outside Windows, the temporary directory can be shared with other local users, so setSLIDERULE_HOOK_STATE_DIRto a private directory there. - Apart from the spec project
initwrites and builds, SlideRule never compiles your projects into assemblies, but loading a solution runs code from it. Give a solution the trust you give an IDE that opens it. MSBuildWorkspace evaluates the project files and runs a design-time build of each project, in a build host it starts as a child process. On Windows, SlideRule first runsvswhere.exeto find Visual Studio's MSBuild, unlessSLIDERULE_VS_INSTALL_PATHnames an install. A design-time build runs the targets that lead up to compiling, and skips the compiler. Binding the compilations runs the solution's source generators in the SlideRule process. A--binlogreplay loads the analyzers and generators the recorded build used, from their paths on disk. Each later run that replays the copy in the cache loads them too. - The spec is a built assembly that SlideRule loads in a collectible
AssemblyLoadContextand runs, either the one you name or the one it finds by convention. A spec runs with your privileges, so treat a spec from an untrusted source as you would any code you run. - The
SlideRule,SlideRule.AnalyzersandSlideRule.Guidance.DotNetpackages run code inside the compiler and the IDE. TheSlideRulepackage adds a spec analyzer and a completion provider to the spec project.SlideRule.Analyzerschecks each project that references it against the model file, andSlideRule.Guidance.DotNetchecks it against the .NET guidance rules built into its assembly. Each reads the compilation it runs in.SlideRule.Analyzersalso reads the model file and the baseline files inarch/baselinesnext to it.SlideRule.Guidance.DotNetreads the model file when the build passes it in. None of these packages writes a file.
Each release ships a signed build provenance attestation covering all five packages. Download a .nupkg from the GitHub release and verify it as built:
gh attestation verify SlideRule.Cli.<version>.nupkg --repo andypgray/slideruleThe release also includes the Sigstore bundle (attestation.intoto.jsonl) for offline verification with gh attestation verify --bundle.
The nuget.org copy differs, because nuget.org adds a repository signature (.signature.p7s) after upload, and that changes the file's hash. The attestation therefore matches only the copy on the GitHub release. Use the GitHub release asset for digest verification, and dotnet nuget verify <file> for the nuget.org repository signature.
dotnet tool install -g SlideRule.Cli and, on a machine with a .NET 10 SDK installed, dotnet dnx SlideRule.Cli fetch the same nuget.org package. sliderule --version prints <version>+<commit>, and that commit matches the release tag on andypgray/sliderule, a source cross-check that needs no tooling.
Publishing uses NuGet trusted publishing (OIDC), so there is no long-lived API key to store or leak. The release workflow builds, tests, packs and attests every package, and lists the release in the MCP registry with the same kind of OIDC token, with no stored registry credential. Builds use SourceLink and a deterministic CI configuration. Every GitHub Actions dependency is pinned to a commit SHA. Every NuGet dependency of the shipped projects is locked to a content hash in a committed packages.lock.json, which CI restores in locked mode. Dependabot proposes updates to both kinds of pin, and a NuGet update passes CI once its lock files are regenerated, as the contributing guide explains.