Skip to content

TMKB v0.1.0 — Initial Release

Latest

Choose a tag to compare

@mark-chris mark-chris released this 16 Feb 04:43
· 58 commits to main since this release

TMKB v0.1.0 — Initial Release

The Threat Model Knowledge Base (TMKB) is a security context source that agents, tools, and humans can consume—starting with threat patterns for authorization enforcement in multi-tenant applications.

Highlights

  • 12 authorization threat patterns covering the architectural security gaps that LLMs systematically miss
  • CLI tool with sub-second query response (~120ms)
  • MCP server for seamless integration with Claude Code and other AI coding assistants
  • Validated: 6 independent baseline tests across 3 providers (Anthropic, OpenAI, Google) confirm 100% async boundary failure rate without TMKB; 0% with TMKB

Pattern Library

Tier A — Full Depth (5 patterns)

ID Pattern Severity
TMKB-AUTHZ-001 Background Job Authorization Context Loss High
TMKB-AUTHZ-002 List/Detail Authorization Inconsistency High
TMKB-AUTHZ-003 Soft-Delete Resurrection Attack High
TMKB-AUTHZ-004 Tenant Isolation via Application Logic Critical
TMKB-AUTHZ-005 User-Account-Resource Ownership Confusion High

Tier B — Essential Coverage (7 patterns)

ID Pattern Severity
TMKB-AUTHZ-006 Mass Assignment of Ownership Fields High
TMKB-AUTHZ-007 Insecure Direct Object Reference via Sequential IDs High
TMKB-AUTHZ-008 Authorization Bypass via HTTP Method Override Medium
TMKB-AUTHZ-009 State Transition Authorization Bypass High
TMKB-AUTHZ-010 Unauthorized Access via Relationship Traversal High
TMKB-AUTHZ-011 Authorization Check in Wrong Layer High
TMKB-AUTHZ-012 Inconsistent Authorization in Bulk Operations High

Each pattern includes: threat description, attack scenarios, mitigations with code examples (Python/Flask), testing guidance, and validation data.

CLI Tool

# Query by context
./tmkb query --context "background job processing"

# Filter by language/framework
./tmkb query --context "file upload" --language python --framework flask

# List all patterns
./tmkb list

# Get specific pattern
./tmkb get TMKB-AUTHZ-001

# Validate pattern files
./tmkb validate --all

MCP Server Integration

Add to ~/.claude/mcp_settings.json:

{
  "mcpServers": {
    "tmkb": {
      "command": "/path/to/tmkb",
      "args": ["serve"]
    }
  }
}

See the MCP Integration Guide and Claude Code Integration Example for details.

Validation Results

Invariant Baseline (6 runs) Enhanced (with TMKB)
Auth on mutating endpoints 5/6 pass Pass
Object ownership validated 4/6 pass Pass
List/detail consistency 5/6 pass Pass
Async boundary re-auth 0/6 pass Pass

The async boundary invariant failed 100% across Claude Sonnet 4.5, Claude Opus 4.6, GPT-5.2, and Gemini—confirming this is a systematic, provider-invariant LLM blindspot that TMKB addresses.

Installation

Download Binary

Download the appropriate binary for your platform from the assets below, then:

chmod +x tmkb-*
./tmkb-linux-amd64 list   # or your platform's binary

Build from Source

git clone https://github.com/mark-chris/tmkb.git
cd tmkb
go build -o bin/tmkb ./cmd/tmkb

Requires Go 1.25+.

What's Next

  • Additional pattern categories beyond authorization
  • Support for more languages and frameworks
  • Enhanced validation with broader prompt coverage
  • Community pattern contributions

Full Changelog

https://github.com/mark-chris/tmkb/commits/v0.1.0