openclaw - ✅(Solved) Fix [Bug]: notion skill docs use curl pattern that triggers allowlist miss [2 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59235Fetched 2026-04-08 02:27:07
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×2referenced ×1renamed ×1

Root Cause

This is not a blocker once you know the workaround, but it is very easy to hit in normal secure configurations because the bundled skill docs currently lead users straight into an allowlist miss path.

Fix Action

Fix / Workaround

This is not a blocker once you know the workaround, but it is very easy to hit in normal secure configurations because the bundled skill docs currently lead users straight into an allowlist miss path.

PR fix notes

PR #59254: fix(skills/notion): replace curl with python3+urllib for allowlist-friendly usage

Description (problem / solution / changelog)

Replaces shell-wrapped curl patterns (which fail under security=allowlist exec policies) with python3 one-liners using stdlib urllib.

Fixes #59235.

Problem

The bundled notion skill documents a shell-wrapped curl workflow:

NOTION_KEY="$NOTION_API_KEY"; curl -sS -X POST "https://api.notion.com/v1/search"   -H "Authorization: Bearer $NOTION_KEY" ...

This fails with exec denied: allowlist miss even when /usr/bin/curl is allowlisted, because the allowlist matches resolved executable paths, not shell wrappers with variable chaining.

Solution

Replace all curl examples with equivalent python3 -c"..." one-liners using stdlib urllib:

python3 -c "
import json, os, urllib.request
key = os.environ.get('NOTION_KEY','')
payload = json.dumps({'query': 'page title'}).encode()
req = urllib.request.Request(
    'https://api.notion.com/v1/search',
    headers={'Authorization': f'Bearer {key}', 'Notion-Version': '2025-09-03', 'Content-Type': 'application/json'},
    data=payload
)
print(urllib.request.urlopen(req).read().decode())
"

Benefits:

  • Uses single allowlistable binary (python3) — no shell variable chaining
  • stdlib urllib — no external dependencies
  • Works under security=allowlist, ask=off policies
  • All existing API functionality preserved

Changed files

  • skills/notion/SKILL.md (modified, +118/-59)

PR #59870: docs(skill): make notion examples allowlist-friendly

Description (problem / solution / changelog)

Summary

  • remove the NOTION_KEY=$(...) shell-wrapper pattern from the bundled Notion skill examples
  • explain why shell control and expansion syntax causes allowlist misses in strict OpenClaw exec setups
  • add an allowlist-friendly helper-script example for Notion search via an already-allowlisted python3

Verification

  • pnpm dlx markdownlint-cli2 skills/notion/SKILL.md
  • git diff --check

Closes #59235

Changed files

  • skills/notion/SKILL.md (modified, +53/-11)

Code Example

NOTION_KEY="$NOTION_API_KEY"; curl -sS -X POST "https://api.notion.com/v1/search" \
  -H "Authorization: Bearer $NOTION_KEY" \
  -H "Notion-Version: 2025-09-03" \
  -H "Content-Type: application/json" \
  -d '{"query":"AI技能库"}'

---

exec denied: allowlist miss
RAW_BUFFERClick to expand / collapse

Bug / DX issue

The bundled notion skill currently documents a shell-wrapped curl workflow that is not allowlist-friendly under stricter exec approval policies.

On a macOS OpenClaw 2026.4.1 setup using security=allowlist and ask=off, the documented pattern:

NOTION_KEY="$NOTION_API_KEY"; curl -sS -X POST "https://api.notion.com/v1/search" \
  -H "Authorization: Bearer $NOTION_KEY" \
  -H "Notion-Version: 2025-09-03" \
  -H "Content-Type: application/json" \
  -d '{"query":"AI技能库"}'

fails with:

exec denied: allowlist miss

Even after /usr/bin/curl is explicitly allowlisted.

Why this happens

The allowlist matcher accepts the resolved executable path (for example /usr/bin/curl), but the bundled skill examples rely on a shell wrapper with variable assignment and ; chaining.

In practice, this means:

  • users follow the official bundled skill docs
  • curl itself is allowlisted
  • but the shell-wrapped command still gets rejected as an allowlist miss

So the issue is not Notion auth or API behavior; it's that the documented execution shape is a poor fit for allowlist/off-ask environments.

Environment

  • OpenClaw 2026.4.1 (da64a97)
  • macOS
  • bundled skill: openclaw/skills/notion/SKILL.md
  • exec approvals: security=allowlist, ask=off

What worked instead

A single-file helper executed through an already-allowlisted python3 binary worked reliably for:

  • GET /v1/users/me
  • POST /v1/search

This suggests the Notion integration itself is fine; the problem is the documented shell/curl invocation shape.

Suggested fix

Any of these would improve the experience:

  1. Update the bundled notion skill docs with an allowlist-friendly example that invokes curl directly without shell variable assignment / chaining.
  2. Add a note explaining that NOTION_KEY=...; curl ... may fail under allowlist exec policies even if /usr/bin/curl is allowlisted.
  3. Provide a small bundled helper / atomic tool for common Notion operations so users do not need to rely on shell-wrapped curl at all.

Affected file

  • skills/notion/SKILL.md

This is not a blocker once you know the workaround, but it is very easy to hit in normal secure configurations because the bundled skill docs currently lead users straight into an allowlist miss path.

extent analysis

TL;DR

Update the bundled notion skill documentation with an allowlist-friendly example that invokes curl directly without shell variable assignment or chaining to resolve the allowlist miss error.

Guidance

  • Verify that the curl executable is explicitly allowlisted, as the issue is not with curl itself but with the shell-wrapped command.
  • Consider adding a note to the documentation explaining the potential issue with shell-wrapped curl commands under allowlist exec policies.
  • Provide an alternative example using a small bundled helper or atomic tool for common Notion operations to avoid relying on shell-wrapped curl commands.
  • Review the skills/notion/SKILL.md file to ensure it reflects the updated documentation and examples.

Example

curl -sS -X POST "https://api.notion.com/v1/search" \
  -H "Authorization: Bearer $NOTION_API_KEY" \
  -H "Notion-Version: 2025-09-03" \
  -H "Content-Type: application/json" \
  -d '{"query":"AI技能库"}'

can be replaced with a more allowlist-friendly example, such as:

NOTION_KEY="your_api_key"
curl -sS -X POST "https://api.notion.com/v1/search" \
  -H "Authorization: Bearer $NOTION_KEY" \
  -H "Notion-Version: 2025-09-03" \
  -H "Content-Type: application/json" \
  -d '{"query":"AI技能库"}'

or better yet, using a small helper script.

Notes

The issue is specific to the documented shell-wrapped curl command and not with the Notion API or authentication. The provided workaround using a single-file helper executed through an already-allowlisted python3 binary suggests that the Notion integration itself is fine.

Recommendation

Apply a workaround by updating the bundled notion skill documentation with an allowlist-friendly example, as this will resolve the allowlist miss error and improve the user experience.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING