code-signing

Rules for signing .NET software and packages so their origin can be verified. They apply when the project has the specified signing configuration files or a SignClient configuration.

In plain words
What is it for?
Use them when configuring .NET code signing with SignClient. They cover secret storage, environment-specific settings, credential rotation, audit logging, and GitHub Actions package-signing steps.
Why use it?
They reduce the risk of exposing signing credentials or producing packages without a controlled signing process. They also define safer handling in continuous integration, the automated build-and-check system.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/aaronontheweb/dotnet-cursor-rules/code-signing
Clone the repo
git clone --depth 1 https://github.com/Aaronontheweb/dotnet-cursor-rules
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 625 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00625
Opus 5 $0.00000 $0.00313
Sonnet 5 $0.00000 $0.00125
Haiku 4.5 $0.00000 $0.00063

Measured yesterday against content hash 102620f8bfba, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-signing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ci-cd/code-signing.mdc · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

.NET Code Signing Rules and Best Practices

Prerequisites

These rules only apply when one of the following exists:

  • signsettings.json
  • appsettings.json with a SignClient section

Code Signing Configuration

SignClient Configuration

{
  "SignClient": {
    "AzureAd": {
      "AADInstance": "https://login.microsoftonline.com/",
      "ClientId": "[configured in CI]",
      "TenantId": "[configured in CI]"
    },
    "Service": {
      "Url": "https://signing-service.example.com/",
      "ResourceId": "[configured in CI]"
    }
  }
}

Security Best Practices

  1. Never commit signing credentials to source control
  2. Store signing credentials in CI/CD secret variables
  3. Use environment-specific signing configurations
  4. Implement proper credential rotation
  5. Log signing operations for audit purposes

CI/CD Integration

GitHub Actions Example

jobs:
  sign:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    
    - name: Install SignClient
      run: dotnet tool install --global SignClient
    
    - name: Sign NuGet Packages
      run: |
        SignClient sign `
          --config signsettings.json `
          --input "**/*.nupkg" `
          --secret "${{ secrets.SIGN_CLIENT_SECRET }}" `
          --name "MyProject" `
          --description "Official release package"

Azure DevOps Example

steps:
- task: UseDotNet@2
  inputs:
    useGlobalJson: true

- script: dotnet tool install --global SignClient
  displayName: 'Install SignClient'

- powershell: |
    SignClient sign `
      --config signsettings.json `
      --input "$(Build.ArtifactStagingDirectory)/*.nupkg" `
      --secret "$(SignClientSecret)" `
      --name "$(Build.DefinitionName)" `
      --description "Official release package"
  displayName: 'Sign Packages'
  env:
    SignClientSecret: $(SignClientSecret)

Verification

  1. Implement post-signing verification
  2. Check signature validity before publishing
  3. Include signature verification in test pipeline
  4. Document signature verification process

Read the full file on GitHub · 107 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 107 lines · 625 tokens per session scan A 102620f8bfba

Subscribe to this mod's changes

code-signing is a cursor rule published in the GitHub repository Aaronontheweb/dotnet-cursor-rules (134 stars, last pushed 1y ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 625 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.