Skip to content

client: readStore trusts an unsigned policy.json unconditionally #119

Open

Description

@codeyevsky

Problem

In packages/core/client/localstore.go:105, readStore loads policy.json from disk and uses its contents without invoking the signature-verification path (crypto.VerifyDocument or equivalent) at all, regardless of whether the system is configured to require signed policy files.

Impact

This is the same "policy.json trust" vulnerability class as the guard/guardcore and crypto findings in this batch, manifesting independently here: a locally writable or tampered policy.json is loaded and applied by readStore with no verification step, letting an attacker with write access to that file silently change enforced policy.

Repro

  1. Replace policy.json on disk with an arbitrary, unsigned (or wrongly signed) policy document.
  2. Trigger a read through readStore and observe the new policy content is loaded and used without any verification call being made.

Suggested fix

Have readStore call the shared signature-verification routine (the same one used elsewhere for policy.json) before accepting the loaded content, rejecting or falling back to a known-good policy when verification fails, consistent with the fix applied in the guard/guardcore and crypto issues in this batch.

Activity

  1. sharmis-tp commented on Nov 18, 2026

    @sharmis-tp

    Trusting an unsigned policy.json means anyone with write access to the store can override security policy. I'll add signature verification before loading and refuse to apply an unsigned policy, with a clear error message for the migration path.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions