Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计异常

assessing-external-test-risk评估外部测试风险

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

605

周安装

26

GitHub Stars

44,379

下载量

212
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:assessing-external-test-risk(评估外部测试风险)
来源仓库:https://github.com/streamlit/streamlit
仓库路径:skills/assessing-external-test-risk
安装命令:
npx skills add https://github.com/streamlit/streamlit --skill assessing-external-test-risk
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/streamlit/streamlit --skill assessing-external-test-risk

简介

assessing-external-test-risk 用于评估分支或 PR 是否需要引入外部端到端测试,以应对浏览器安全边界带来的挑战。

  • 适用场景包括涉及代理、iframe、CSP 约束等复杂环境的测试策略制定与部署保护决策。
  • 核心能力基于 checklist 分类(如跨域、认证、嵌入上下文)判断是否推荐使用 @pytest.mark.external_test 标记。
  • 使用方式为风险推荐而非自动打标,输出 Recommend external_test: Yes/No 结论供人工复核。
  • 安装前应熟悉项目测试框架与外部服务依赖,避免因误判导致线上部署失败或安全漏洞。

SKILL.md

Assessing external test risk

Use this skill to decide whether a branch or PR should include external e2e coverage using @pytest.mark.external_test.

This helps protect deployments that commonly involve proxies, embedded iframe contexts, CSP constraints, and other browser security boundaries.

This skill is for risk assessment and recommendation. It does not auto-mark tests unless explicitly requested.

Decision rule

Use an any-hit policy:

  • If any checklist category is hit, output Recommend external_test: Yes
  • If no categories are hit, output Recommend external_test: No

Inputs to review

  • Branch or PR diff against its base branch
  • Changed files and related tests
  • PR description (if available)

Assessment workflow

  1. Gather the changed files and full diff against the base branch.
  2. Evaluate each checklist category below as hit or not hit.
  3. Record concrete evidence from file paths and diff snippets.
  4. Produce a recommendation and specific external-test focus areas.

Checklist categories

Evaluate all categories. A single hit is enough to recommend external coverage.

  1. Routing and URL behavior

- Hit when changes introduce or modify Starlette routes, server.baseUrlPath, catch-alls, request methods, URL resolution, redirects, or status codes.

  1. Auth, cookies, CSRF, and identity binding

- Hit when changes touch login/logout or OAuth flows, _streamlit_user, _streamlit_xsrf, CSRF/XSRF handling, server.trustedUserHeaders, or session-to-identity binding.

  1. Websocket handshake and session transport

- Hit when changes affect websocket handshake or subprotocols, session affinity, reconnect behavior, ping or timeout behavior, message size limits, or fragmentation.

  1. Embedding and iframe boundary

- Hit when changes modify host-to-guest communication (postMessage), iframe sizing or resize behavior, iframe sandbox or allow attributes, or permissions policy behavior in embedded contexts.

  1. Static and component asset serving

- Hit when changes alter asset handlers, cache headers, size limits, base paths (including server.customComponentBaseUrlPath), or proxying rules for static/component assets.

  1. Service worker, uploads, and downloads

- Hit when changes modify service worker registration, scope, or caching strategy; upload/download endpoints; JWT or CSRF wrapping; or download attribute behavior.

  1. Cross-origin behavior and external networking

- Hit when changes alter CORS allowlists, crossOrigin usage, external-origin fetches or external networks behavior, or backend URL discovery via window.__streamlit.*.

  1. Cross-origin theming and resource discovery

- Hit when changes introduce or modify theme/resource loading across origins (fonts, images, theme globals), CSS isolation with host pages, or manifest/asset discovery when HTML is not served by Starlette.

  1. SiS and Snowflake runtime dependencies

- Hit when changes rely on or modify SiS/Snowflake runtime behavior, including running_in_sis(), get_active_session(), Snowflake connection/session semantics, or SiS-specific environment flags.

  1. Client storage behavior

- Hit when changes introduce or modify cookies, localStorage, or sessionStorage usage that may differ in embedded or third-party contexts.

  1. Security headers and browser policies

- Hit when changes adjust CSP, Referrer-Policy, Permissions-Policy, or related headers that can impact embedding or resource loading.

Output format

Use this exact structure:

## External test recommendation

- Recommend external_test: [Yes/No]
- Triggered categories: [List category numbers and names, or "None"]
- Evidence:
  - `<path>`: [short reason from diff]
  - `<path>`: [short reason from diff]
- Suggested external_test focus areas:
  - [Concrete scenario to validate externally]
  - [Concrete scenario to validate externally]
- Confidence: [High/Medium/Low]
- Assumptions and gaps: [Unknowns, missing context, or why confidence is reduced]

Interpretation guidance

  • Prefer evidence over intuition. Tie each hit to concrete diff details.
  • When in doubt, err toward Yes if externally hosted or embedded behavior could diverge from local runs.
  • Keep focus areas specific and testable (route, auth handshake, iframe boundary, asset loading, SiS runtime behavior).

Examples

Example yes recommendation

Diff includes:

  • lib/streamlit/web/server/starlette/starlette_routes.py route changes
  • Cookie/XSRF handling updates in request auth middleware
  • Frontend embed code changing iframe allow attributes

Expected output:

  • Recommend external_test: Yes
  • Triggered categories include routing, auth/cookies/CSRF, and embedding boundary
  • Focus areas include external host iframe embedding + auth/session continuity checks

Example no recommendation

Diff includes:

  • Pure refactor in internal utility functions with no network, auth, embedding, storage, or runtime integration impact
  • Docs and test name cleanup only

Expected output:

  • Recommend external_test: No
  • Triggered categories: None
  • Confidence is high if no indirect integration points are touched

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.04%
按下载量换算74

Claude

27.75%
按下载量换算59

Cursor

21.14%
按下载量换算45

Gemini CLI

10.13%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills