display-conditions-bypass

display-conditions-bypass is a cursor rule for Cursor from atlassian/forge-skills. It costs 11 tokens per session (1,014 once invoked), scanned A, original, Apache-2.0.

A security rule for Atlassian Forge apps that checks whether hidden interface elements are being treated as access control. Display conditions only hide a control; they do not stop someone from calling its underlying resolver directly.

In plain words
What is it for?
Use it when reviewing Forge panels, actions, resolvers, and other features whose visibility depends on whether a user is an administrator or meets another condition.
Why use it?
It prevents attackers from reaching administrative or other restricted operations through direct requests when the app protects them only by hiding the interface.

Cursor rule for Cursor ✓ vendor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when reviewing Forge panels, actions, resolvers, and other features whose visibility depends on whether a user is an administrator or meets another condition.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/atlassian/forge-skills/display-conditions-bypass
About the project

Atlassian Forge Skills supports Atlassian Forge, a platform for building and deploying apps that extend products such as Jira and Confluence. Its skills and MCP-backed tools help coding agents create Forge apps, review them before deployment, optimize usage, troubleshoot failures, and work with Forge APIs and the Atlassian Design System.

atlassian/forge-skills · 21 stars · on GitHub · developer.atlassian.com

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.

Clone the repo
git clone --depth 1 https://github.com/atlassian/forge-skills

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for display-conditions-bypass

README.md
[![agentmods](https://agentmods.dev/badge/rules/atlassian/forge-skills/display-conditions-bypass.svg)](https://agentmods.dev/rules/atlassian/forge-skills/display-conditions-bypass)
Your own site
<a href="https://agentmods.dev/rules/atlassian/forge-skills/display-conditions-bypass"><img src="https://agentmods.dev/badge/rules/atlassian/forge-skills/display-conditions-bypass.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,014 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00011 $0.01014
Opus 5 $0.00005 $0.00507
Sonnet 5 $0.00002 $0.00203
Haiku 4.5 $0.00001 $0.00101

Measured 8d ago against content hash 810278cd8cf8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

display-conditions-bypass 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 8d ago.

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.

skills/forge-security-review/assets/security-rules/forge-authn-authz/display-conditions-bypass.mdc · 147 lines

How it starts

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

Context

  • Forge display conditions only control UI visibility; they do NOT provide authorization. Attackers can bypass hidden UI by directly invoking resolvers via GraphQL or the bridge.
  • Related CWE: CWE-862 (Missing Authorization), CWE-656 (Reliance on Security Through Obscurity).
  • Documented footgun: PBAC-292 - Display conditions mistaken for authorization.

The Security Gap

Display Condition: "Only show admin panel if user.isAdmin"

User View (Normal):                  Attacker View:
┌─────────────────────┐              ┌─────────────────────┐
│  Regular UI         │              │  Direct invoke()    │
│  (Admin hidden)     │              │  to resolver        │
└─────────────────────┘              └─────────────────────┘
         ↓                                    ↓
   Can't see admin                    Calls admin resolver
   features                           DIRECTLY - bypasses UI!

Vulnerable Patterns

# manifest.yml - Display condition gives false sense of security
modules:
  jira:issuePanel:
    - key: admin-panel
      title: Admin Settings
      function: adminPanelResolver
      displayConditions:
        - condition: user_is_admin  # ONLY hides UI!
// VULNERABLE - Resolver assumes display condition provides auth
resolver.define('getAdminConfig', async ({ payload, context }) => {
  // No authorization check! Assumes only admins can call this
  // because display condition hides the UI
  const config = await storage.getSecret('admin-config');
  return config;
});

// VULNERABLE - Resolver trusts that hidden UI means no access
resolver.define('deleteAllData', async ({ payload }) => {
  // "Only admins see the delete button" is NOT authorization!
  await dangerousDeleteOperation();
  return { success: true };
});

Secure Patterns

// SECURE - Authorization in resolver regardless of display conditions
resolver.define('getAdminConfig', async ({ payload, context }) => {
  // Verify admin status server-side
  const isAdmin = await checkUserIsAdmin(context.accountId);
  if (!isAdmin) {
    throw new Error('Admin access required');
  }
  
  const config = await storage.getSecret('admin-config');
  return config;
});

// SECURE - Full authorization check
resolver.define('deleteAllData', async ({ payload, context }) => {
  // Check permission via Atlassian API
  const api = asUser();
  const perms = await api.requestJira(
    route`/rest/api/3/mypermissions?permissions=ADMINISTER_PROJECTS`
  );
  
  if (!perms.permissions.ADMINISTER_PROJECTS.havePermission) {
    throw new Error('Insufficient permissions');
  }
  
  await dangerousDeleteOperation();
  return { success: true };
});

Detection Checklist

  • Find all displayConditions in manifest.yml modules.
  • For each conditional module, identify associated resolvers/functions.
  • Check if those resolvers have independent authorization checks.
  • Flag resolvers that assume display conditions provide security.
  • Look for admin/privileged resolvers without server-side auth.

Bypass Demonstration

// Attacker can call hidden resolver directly:
import { invoke } from '@forge/bridge';

// This works even if UI is hidden by displayConditions!
const adminConfig = await invoke('getAdminConfig', {});
console.log(adminConfig);  // Sensitive data exposed

Display Condition Types (All Bypassable)

# All of these only hide UI - none provide authorization:
displayConditions:
  - condition: user_is_admin
  - condition: user_is_logged_in  
  - condition: has_project_permission
    params:
      permission: ADMINISTER_PROJECTS
  - condition: entity_property_exists
    params:
      propertyKey: feature-enabled

PoC / Test Leads

  • Identify a module with displayConditions.
  • As a non-qualifying user, directly call invoke('resolverName', payload).
  • Verify if the resolver returns data or performs actions.
  • Test admin-only features as regular user via direct invocation.

Remediation Guidance (advisory)

Read the full file on GitHub · 147 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. 8d ago First seen · 147 lines · 11 tokens per session scan A 810278cd8cf8

Subscribe to this mod's changes

display-conditions-bypass is a cursor rule published in the GitHub repository atlassian/forge-skills (21 stars, last pushed 3d ago), licensed Apache-2.0. It adds 11 tokens to every session and 1,014 once invoked, about $0.0001 per session on Opus 5. 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-30.