/auditsentry:oracle-redundancyfrom auditsentry
Detects oracle redundancy failures: missing staleness/heartbeat checks, single points of failure, silent fallbacks, L2 sequencer-uptime gaps, and absent circuit breakers. Activates on price feed reads.
Ships in auditsentry. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Trigger on any of:
latestRoundData() / latestAnswer() reads from Chainlink or any push feed(, int256 price,,,) = feed.latestRoundData(); // ignores updatedAt & answeredInRound
require(price > 0);
return uint256(price);
Signal: no updatedAt freshness gate. A frozen feed (feed deprecated, node outage, or a market-wide halt) returns the last value forever; protocol prices off stale data. Require block.timestamp - updatedAt <= heartbeat and answeredInRound >= roundId.
One feed, no fallback, no degradation plan. If that feed is deprecated or returns garbage, the protocol is bricked or mispriced. Signal: a hard dependency on exactly one external address with no alternative path.
try feed.latestRoundData() returns (...) { ... }
catch { return lastGoodPrice; } // ← stale, or worse:
catch { return 0; } // ← 0 collateral value = mass liquidation, or free mint
Signal: the catch path masks failure. Returning 0 can make collateral worthless (mass liquidation) or debt free; returning a stale cached price keeps trading on bad data. Failures must surface, not be swallowed.
// Arbitrum/Optimism: no check of the sequencer uptime feed
(, int256 answer, uint256 startedAt,,) = sequencerUptime.latestRoundData();
require(answer == 0 && block.timestamp - startedAt > GRACE_PERIOD);
Signal: on an L2, if the sequencer was down, Chainlink prices are stale on resume. Without the uptime feed + grace period, the first post-downtime block liquidates everyone at stale prices. Chainlink documents this exact guard.
The aggregator handles primary-down but has no defined behavior when every source is stale/reverting — it either reverts (DoS) or falls through to an uninitialized default. Define an explicit safe-halt (pause) rather than trade on uncertainty.
Accepting any reported price without comparing primary vs secondary deviation, so a single compromised/erroneous feed is trusted outright.
| Pattern | Severity | Notes |
|---|---|---|
| Fallback returns 0 on failure | High | Mass liquidation / free mint |
| Missing staleness/heartbeat gate | High | Trades on frozen price |
| Single feed, no fallback | High | Brick / misprice on outage |
| Missing L2 sequencer-uptime check | High | Stale-price liquidation on resume |
| "All down" path reverts (DoS) vs safe-halt | Medium | Availability vs safety tradeoff |
| No primary/secondary deviation check | Medium | Single bad feed trusted |
updatedAt freshness vs a per-feed heartbeat, answeredInRound >= roundId, price > 0, and a sane min/max bound.GRACE_PERIOD before trusting prices post-downtime (Chainlink reference pattern).updatedAt, answeredInRound, and bounds is fine — don't re-flag for "no fallback" if it correctly pauses on staleness.What SKILL.md sets; muted values are Claude Code's defaults
45 skills in this plugin
/access-controlDetect missing or incorrect access control — missing modifiers, wrong role checks, privileged function exposure, public initializers, and role-escalation paths. Activate on any function that mutates state, transfers funds, mints tokens, sets admin parameters, upgrades implementations, or pauses/unpauses./approval-issuesDetect ERC-20 approval pitfalls — approve race (front-run), missing safeApprove, infinite approvals, approval-without-revoke, Permit2 misuse, max-approval to untrusted contracts. Activate on `approve`, `safeApprove`, `permit`, `forceApprove`, `Permit2`, `IERC20.allowance`./caching-and-incrementalAlways-on meta-skill — cache audit results per file by content hash so unchanged files aren't re-analyzed on subsequent runs. Activate on every /audit, /quick-scan, /audit-changes invocation./centralization-riskDetect centralization and trust-assumption risks — admin powers, single-key risk, missing timelocks, upgrade authority, treasury keys, pause permanence, blacklisting authority, oracle authority. Activate on `onlyOwner`, `onlyRole`, `AccessControl`, upgrade authorizations, pause/unpause functions, mint/burn caps, treasury/fee setters./confidence-scoringAlways-on meta-skill — for every finding produced, attach a confidence level (HIGH/MEDIUM/LOW) and a reasoning trace. Activate on every /audit, /audit-deep, /audit-changes, /audit-live, /quick-scan invocation./cosmwasmDetect bug classes specific to CosmWasm (Rust) contracts — missing info.sender authorization in execute handlers, unbounded map iteration → gas/DoS, reply/submessage reply_id confusion, migrate admin backdoors, addr_validate vs raw string addresses, unchecked info.funds, Uint128 overflow, query reentrancy, and migration/version state. Activate on any `.rs` file with `use cosmwasm_std`, `#[entry_point]`, `ExecuteMsg`, `InstantiateMsg`, `QueryMsg`, `cw_storage_plus`, or `DepsMut`.npx claudepluginhub iktok90-design/ai-smart-contract-auditor --plugin auditsentryOther plugins' skills for the same job