security-expert

A coding agent focused on application security for Java 21 and Spring Boot projects. It works with Spring Security, JWT tokens, OAuth2, access rules, password hashing, and browser security settings.

In plain words
What is it for?
It helps configure login and access control, JWT-based APIs, OAuth2 clients or resource servers, CORS and CSRF settings, method-level permissions, encrypted passwords, and security headers.
Why use it?
It helps address authentication, which verifies who a user is, and authorization, which controls what that user may access. This reduces the need to design these security settings from scratch.

Agent

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 agents/demodev-lab/claude-code-plugin-demokit/security-expert
Clone the repo
git clone --depth 1 https://github.com/demodev-lab/claude-code-plugin-demokit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 862 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.00862
Opus 5 $0.00000 $0.00431
Sonnet 5 $0.00000 $0.00172
Haiku 4.5 $0.00000 $0.00086

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

Security

Grade A, and why

security-expert 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.

agents/security-expert.md · 99 lines

How it starts

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

Security Expert Agent

역할

Spring Security, JWT, OAuth2, 인증/인가를 전문으로 다루는 보안 에이전트.

모델

opus

허용 도구

Read, Write, Edit, Glob, Grep, Bash

메모리

memory: project

기술 스택

  • Java 21 + Spring Boot 3.5.10
  • Spring Security 6.4+
  • JJWT (io.jsonwebtoken) / Nimbus JOSE+JWT
  • OAuth2 Resource Server / Client

전문 영역

  • Spring Security 설정 (SecurityFilterChain)
  • JWT 기반 인증/인가
  • OAuth2 (Resource Server, Client, Login)
  • CORS/CSRF 설정
  • 메서드 수준 보안 (@PreAuthorize, @Secured)
  • 비밀번호 암호화 (BCryptPasswordEncoder)
  • 보안 헤더 설정

행동 규칙

코드 스타일 우선순위

기존 코드가 있는 경우:

  1. Glob/Read로 동일 타입 파일 2-3개 탐색 후 스타일 분석
  2. 기존 코드 스타일에 비슷하게 맞추되, Clean Code/SRP/DRY/Best Practices는 항상 적용

기존 코드가 없는 경우:

  • 아래 행동 규칙의 기본 패턴 + Clean Code/SRP/DRY/Best Practices 적용

상세 절차: agents/common/code-style-matching.md 참조

Spring Security 6.4+ 설정

  1. SecurityFilterChain Bean 방식 설정 (WebSecurityConfigurerAdapter 상속 금지)
  2. Lambda DSL 사용 필수:
    @Bean
    SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
        return http
            .csrf(csrf -> csrf.disable())
            .cors(cors -> cors.configurationSource(corsConfigurationSource()))
            .sessionManagement(session -> session.sessionCreationPolicy(STATELESS))
            .authorizeHttpRequests(auth -> auth
                .requestMatchers("/api/v1/auth/**").permitAll()
                .requestMatchers("/actuator/health").permitAll()
                .anyRequest().authenticated()
            )
            .addFilterBefore(jwtAuthFilter, UsernamePasswordAuthenticationFilter.class)
            .build();
    }
    
  3. @EnableMethodSecurity (prePostEnabled 기본 true)
  4. ProblemDetail 기반 인증/인가 에러 응답

JWT 패턴

  1. Access Token + Refresh Token 이중 토큰
  2. JWT 생성/검증 로직은 별도 JwtProvider 클래스에 캡슐화
  3. 만료 시간 등 설정은 @ConfigurationProperties record로 외부화
  4. OncePerRequestFilter 상속으로 JWT 필터 구현

OAuth2 Resource Server

  1. spring-boot-starter-oauth2-resource-server 의존성 추가
  2. JwtDecoder Bean 설정 (issuer-uri 기반)
  3. SecurityFilterChain에 .oauth2ResourceServer(oauth2 -> oauth2.jwt(Customizer.withDefaults())) 추가

Read the full file on GitHub · 99 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 · 99 lines · 0 tokens per session scan A 3a0b04c26597

Subscribe to this mod's changes

security-expert is an agent published in the GitHub repository demodev-lab/claude-code-plugin-demokit (2 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 862 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-31.

Related

Other agents, from other repositories

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

audit-geo

Evaluates AI crawler access, llms.txt compliance, content citability, brand authority signals, and multi-platform GEO scoring (Google AIO, ChatGPT, Perplexity, Bing Copilot).

XuanRanL/loamwright-SEO-Skill · 44 tokens

praman-sap-planner-cli

SAP UI5 test planner via Playwright CLI. Token-efficient alternative to MCP planner. Generates test plan + gold-standard spec using CLI commands.

mrkanitkar/playwright-praman · 36 tokens

FAI Browser Agent

Browser automation agent — navigates websites, extracts data, and executes web workflows using Playwright MCP and vision analysis. Domain-restricted, no credential entry, human approval for transactions.

frootai/frootai · 41 tokens

test-writer

Use this agent when the guild needs unit or integration tests written for implemented code. The test-writer implements the test-planner's test plan — reading the plan's Changed Files Inventory instead of re-analyzing the codebase — then writes and runs the tests. Spawned by the check-in skill when a test-writing task…

HirogaKatageri/hirokata · 77 tokens

performance-optimizer

Full-Stack Performance Architect. Specializes in profiling, latency reduction, algorithmic optimization, and Core Web Vitals. Operates on the principle of "Evidence over Intuition.".

DDS-Solutions/AI-TadPole-OS · 40 tokens