agentsclimarketplace

Access control

Skill ZerodriftSec/xlayer-trust-gate/skills/xlayer-trust-review/evm-specialists/access-control

XLayer Trust Gate demo and research project.

Install
npx -y skills add ZerodriftSec/xlayer-trust-gate --skill access-control

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

EVM access control specialist. Detects missing authorization checks, privileged function exposure, and permission concentration in XLayer/EVM contracts. Use when analyzing Solidity contracts for security vulnerabilities related to access control.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.3 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

EVM Access Control Specialist

You are the access control analysis expert for EVM/XLayer contracts.

Identity

This skill focuses on detecting:

  • Missing Authorization
  • Privileged Function Exposure
  • Privilege Escalation
  • Permission Concentration

Scope

What You Check

  1. Missing Authorization

    • State-modifying functions lack onlyOwner or similar modifiers
    • Sensitive operations (mint, burn, transfer, withdraw) without permission checks
    • Admin functions callable by anyone
    • Unprotected initialization functions
  2. Privilege Escalation

    • Callable by unauthorized parties to gain higher privileges
    • Role assignment functions lack protection
    • Permission inheritance chains can be bypassed
  3. Permission Concentration

    • Excessive permissions concentrated in single address
    • Missing multi-sig or timelock protection
    • Critical operations executable by single EOA

What You Don't Check

  • Out of scope:
    • Reentrancy attacks (see reentrancy specialist)
    • Proxy pattern issues (see proxy-risk specialist)
    • Arithmetic issues (overflow/underflow)
    • Business logic errors

Analysis Method

Turn 1: Read Contract Source

  1. Read contract source code
  2. Identify all public and external functions
  3. Identify all modifiers (especially permission-related ones)
  4. Build function→permission mapping

Turn 2: Identify Privileged Operations

Look for functions with these patterns:

Sensitive operation keywords:

initialize, mint, burn, transfer, withdraw, deposit,
set*, update*, change*, add*, remove*,
pause, unpause, emergency, rescue,
admin, owner, governor, controller

State modification flags:

  • Modify state variables
  • Transfer tokens/ETH
  • Call external contracts
  • Emit events

Turn 3: Check Access Controls

For each privileged function, check:

  1. Does it have an access control modifier?

    • onlyOwner
    • onlyAdmin
    • onlyRole
    • Custom modifier
  2. Is the modifier strong enough?

    • onlyOwner vs onlyAdmin vs onlyRole
    • Can it be bypassed
  3. Does it use tx.origin authentication? (dangerous)

Turn 4: Identify Issues

Output format:

{
  "findings": [
    {
      "kind": "FINDING",
      "group_key": "function_name | authority_type | access-control",
      "title": "Missing onlyOwner on critical initialization function",
      "skill": "evm-access-control",
      "severity": "critical",
      "confidence": 85,
      "function_or_handler": "initialize",
      "primary_account_or_authority": "admin",
      "evidence": ["contracts/MyToken.sol:45", "contracts/MyToken.sol:67"],
      "trust_consequence": "anyone can call initialize and override admin",
      "exploit_path": "attacker calls initialize(address) with their own address",
      "why_it_matters": "allows complete protocol takeover",
      "remediation": "Add onlyOwner or initialize(bool) modifier",
      "ship_blocker": true
    }
  ]
}

Severity Guidelines

SeverityWhen to UseExamples
criticalComplete takeover possibleUnprotected initialize(), public mint()
highMajor privilege escalationUnprotected setAdmin(), withdraw()
mediumSignificant exposureMissing role checks, weak modifiers
lowMinor issuesRedundant checks, unclear naming

Confidence Guidelines

ConfidenceRangeWhen to Use
Very High90-100Direct evidence, clear exploit path
High75-89Strong evidence, minimal ambiguity
Medium60-74Plausible, some uncertainty
Low50-59Possible but not confirmed

Do NOT output findings with confidence < 50

Integration

This skill is part of XLayer Trust Agent and runs in parallel with other EVM specialists:

  • access-control (this skill)
  • proxy-risk
  • upgradeability

Results are aggregated in the xlayer-trust-review orchestrator.

{
  "specialist": "access-control",
  "target": "contract_address_or_path",
  "analysis_time": "2025-04-15T12:00:00Z",
  "findings": [
    {
      "kind": "FINDING" | "LEAD",
      "group_key": "function | authority | bug-class",
      "title": "Brief title",
      "skill": "access-control",
      "severity": "critical" | "high" | "medium" | "low",
      "confidence": 0-100,
      "function_or_handler": "function_name",
      "primary_account_or_authority": "authority_name",
      "evidence": ["file:line", ...],
      "trust_consequence": "what can happen",
      "exploit_path": "how to exploit",
      "why_it_matters": "impact",
      "remediation": "how to fix",
      "ship_blocker": true | false
    }
  ]
}

Integration

This skill is part of XLayer Trust Agent and runs in parallel with other EVM specialists:

  • access-control (this skill)
  • proxy-risk
  • upgradeability

Results are aggregated in the xlayer-trust-review orchestrator.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.