Works with the AI Agents you already use

    Spring Audit Coverage

    by Puneet Swarup

    1

    Most Spring Boot services log some calls and not others, and nobody knows which.

    Free

    Security scanned
    Spring Audit Coverage

    Spring Audit Coverage

    Example session with this skill installed

    Request

    Is our audit logging complete? Point the scanner at the repo in the current directory
    and tell me what to fix first.
    

    What the agent did

    Ran python scripts/scan.py . against a Spring Boot service, then read the report and
    checked whether the central infrastructure covered the gaps.

    Output (trimmed)

    
    # Audit coverage report
    
    Scanned: `payment-service`
    
    ## Summary
    
    - Java files read: **35**
    - Controllers: **5**
    - Endpoints found: **8**
    - With audit logging in the method: **0**
    - **Without audit logging: 8**
    - Central infrastructure found, but none of it mentions auditing
    
    ## Central audit infrastructure
    
    | Kind | Where | Audit-aware |
    |---|---|---|
    | advice | `src/main/java/com/personavault/config/GlobalExceptionHandler.java`:27 | no |
    
    
    ## Endpoints without audit logging, worst first
    
    | Endpoint | Method | Operation | Audited? | Risk | What an auditor asks |
    |---|---|---|---|---|---|
    | `/api/documents/{id}` | DELETE | `deleteDocument()` | no | medium (documents, score 35) | who accessed or destroyed this record - SOC 2 CC7.2, ISO 27001 A.8.15 |
    | `/api/documents/upload` | POST | `upload()` | no | medium (documents, score 30) | who accessed or destroyed this record - SOC 2 CC7.2, ISO 27001 A.8.15 |
    | `/api/chat/stream` | POST | `stream()` | no | low (other, score 20) | every access to this component is logged - PCI DSS 10.2 |
    | `/api/documents` | GET | `listDocuments()` | no | low (documents, score 20) | who accessed or destroyed this record - SOC 2 CC7.2, ISO 27001 A.8.15 |
    
    

    What the agent then said

    Eight endpoints, none audited, and the only central component is an exception handler,
    which is not an audit trail — so these are real gaps. Fix deleteDocument first: it is
    the only endpoint that destroys a record, and the checklist needs the actor, the document
    id and the outcome. A soft delete that leaves no audit row is indistinguishable from an
    accident.


    • Read your context and instructions
    • Compiled the spring audit coverage

    I have analyzed the payment-service repository. While there is a global LoggingFilter, it only captures HTTP metadata and not the specific business outcomes required for SOC2 compliance on financial transactions.

    Audit Coverage Report

    EndpointMethodOperationAudited?Risk
    /api/v1/transfersPOSTMoney movementNoHigh
    /api/v1/kyc/verifyPOSTCustomer identityUnconfirmedHigh
    /api/v1/accounts/{id}DELETEResource deletionNoMedium
    /api/v1/documentsGETDocument accessYesLow

    What I would change first

    1. TransferController: Add an @AuditRecord annotation to the initiateTransfer method. This is the highest risk gap as it moves funds without a verified actor trail.
    2. KycController: Verify if the IdentityAspect covers the verify endpoint. If not, implement a manual auditService.log() call to capture the verification outcome.
    3. AccountController: Add a delete listener to ensure the actor_id and reason_code are captured before the record is purged.

    Next steps

    • Review the proposed @AuditRecord implementation for TransferController.
    • Confirm if IdentityAspect pointcuts include the com.service.kyc package.
    • Verify that the AuditService is configured for asynchronous processing to avoid blocking transactions.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Most Spring Boot services log some calls and not others, and nobody knows which. The gap is usually the endpoint that deletes a document or moves money.

    This skill finds those endpoints and ranks them, so you fix the one that matters first rather than rewriting twelve controllers.

    What it does

    It scans a Spring Boot repository and reports every controller endpoint with no audit logging, worst first:

    • Money movement — payments, transfers, refunds, invoices, claims, renewals
    • Customer identity — authentication, profiles, consent, KYC, roles
    • Documents — upload, download, delete, export
    • Everything else — reads, lookups, configuration

    Every row carries the file and line, so "not audited" is a claim you can check instead of one you have to trust.

    How it works

    The scanner reads each controller method, not each file. A file that mentions AuditService in a comment is not an audited file, and reporting it as one is how a service ends up with a money-movement endpoint nobody records.

    It strips comments and masks string literals before parsing, so a commented-out audit call does not count and a path like "/{id}" is not mistaken for a code block. It also looks for audit infrastructure in one place — aspects, filters, interceptors, controller advice, audited base classes — and if any of it mentions auditing, it marks the gaps unconfirmed rather than reporting them as fact.

    Each gap is stated in the terms an auditor uses — who moved the money, who changed access, who destroyed the record — with an indicative control mapping (SOC 2, PCI DSS, ISO 27001). That is what turns a list of endpoints into a reason to act.

    It diagnoses. It does not write the implementation, because a half-correct audit trail is worse than none.

    Where it stops

    • Regex-based Java parsing, not a compiler. It does not see endpoints defined in Kotlin, XML, GraphQL resolvers or a RouterFunction bean.
    • Audit done in a gateway, proxy or database trigger is invisible to it.
    • "Audited" means the method calls an audit sink or carries an audit annotation. It does not mean the record is complete — the bundled checklist covers that.
    • It does not read application.yml, so it cannot tell you whether audit is switched off in production.

    If your audit logging is already centralised, it will tell you so and stop. That is a correct answer, not a failure to find work.


    If the scan finds gaps you need to close, spring-audit-implementation covers the fix: aspect or filter wiring, masking before the sink, and an audit write that survives a rollback.


    Heuristic-based; requires manual verification of AOP pointcuts, global filters, and base controllers. Does not execute auto-refactoring without confirmation.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 8 days ago

    • Free with an Agensi account

    Software
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed9 days ago
    Updated5 days ago

    What's inside

    Frequently Asked Questions

    This skill specifically identifies endpoints that lack traceability for sensitive actions, such as money movements or identity changes, helping you close compliance gaps for SOC2 or PCI DSS audits.

    The skill scans for global Servlet Filters, Spring AOP Interceptors, and custom annotations to ensure it doesn't flag endpoints that are already covered by centralized logging systems.

    It is designed for any Java-based Spring Boot environment using Spring MVC or Spring WebFlux, including projects using Spring Security for actor tracking.

    No, the skill generates a prioritized report and drafts implementation proposals, allowing developers to review and approve changes before any code is modified.

    You receive the full skill logic, including the risk-based prioritization engine and implementation templates, along with free updates for future Spring Boot version compatibility.

    New in LLM Ops

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Free