Skip to content
Back to skills

Audit Lifecycle

ASecurity

Analyze shutdown, close, and GC-of-cache lifecycle correctness

  • 17,959 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 7, 2026
business

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add ben-manes/caffeine --skill audit-lifecycle --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Audit Lifecycle?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Audit Lifecycle
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ben-manes-audit-lifecycle/badge)](https://www.skillsdirectory.com/skills/ben-manes-audit-lifecycle)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: audit-lifecycle
description: Analyze shutdown, close, and GC-of-cache lifecycle correctness
context: fork
agent: auditor
disable-model-invocation: true
---

Analyze the cache for defects during shutdown, close, and garbage collection
of the cache instance itself.

Assume at least one shutdown or lifecycle race exists. If your analysis yields
zero findings, re-examine scheduler/executor lifecycle and in-flight operations
during close — explain specifically why no race is possible.

1. **Operations racing with close/cleanup**: get/put/compute during cleanUp()
   or GC? close() state transition? Operations after close()?

2. **Scheduler lifecycle**: Does the scheduled future prevent cache GC?
   Can scheduler fire after cache is collected? Is the task cancelled on close?

3. **Executor lifecycle**: Reference cycle between cache and executor?
   RejectedExecutionException handling when executor is shut down?

4. **Removal listener drain on shutdown**: Are pending notifications delivered
   or dropped? Notifications lost if executor shuts down first?

5. **In-flight operations during shutdown**:
   - CacheLoader.load() in progress when cache closes
   - Refresh future's whenComplete callback after close
   - CompletableFuture value pending when cache closes

6. **Multiple close calls**: Is close() idempotent? Concurrent close() corruption?

7. **Finalizer / Cleaner interactions**: Reference queues outliving the cache?
   Reference queue processing accessing dead cache?

8. **jcache manager/cache close**: Is teardown symmetric with setup — the OSGi
   context-classloader swap applied on destroy/close as on create/get; in-flight
   futures awaited; user Closeables (writer, loader, listeners, expiry) closed
   exactly once under the right classloader?

For each defect: state the lifecycle transition, provide a concrete scenario,
state the observable incorrect behavior.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in business →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.