跳到主要内容
知仓学习社ZHICANG

atlassian

|

读凭据联网严重 5 · 高危 3sanjay3290/ai-skills

它会碰到什么

扫了多少8 个文本文件,102 KB
它会碰到什么读凭据联网
命中总数31 处
命中统计严重 5 · 高 3 · 中 14 · 低 9
逐条看命中(8 条严重或高危)
  • 严重 .env.example:3cred-paths
    # These are only needed if you prefer .env over keyring storage.
  • 严重 scripts/auth.py:70cred-paths
    """Load environment variables from .env file if python-dotenv is available."""
  • 严重 scripts/auth.py:73cred-paths
    env_file = skill_dir / ".env"
  • 严重 scripts/auth.py:76cred-paths
    elif Path(".env").exists():
  • 严重 scripts/auth.py:562cred-paths
    print("Or use environment variables instead (see .env.example).", file=sys.stderr)
  • scripts/auth.py:127cred-envread
    base_url = os.environ.get("ATLASSIAN_URL", "")
  • scripts/auth.py:128cred-envread
    email = os.environ.get("ATLASSIAN_EMAIL", "")
  • scripts/auth.py:129cred-envread
    api_token = os.environ.get("ATLASSIAN_API_TOKEN", "")

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Atlassian (Jira + Confluence)

Full Jira and Confluence integration with two authentication methods:

  • OAuth 2.1 via Atlassian MCP server — browser-based consent, auto-refresh tokens, calls MCP tools
  • API token — email + token stored in keyring, calls REST API directly

First-Time Setup

Option 1: OAuth 2.1 via MCP Server (Recommended)

No API tokens or instance URLs needed. Uses dynamic client registration and PKCE.

pip install -r requirements.txt
python scripts/auth.py login --oauth

A browser opens for Atlassian authorization. Select which products (Jira, Confluence, Compass) to grant access. Tokens are stored in the system keyring and auto-refresh when expired.

Check status:

python scripts/auth.py status

Option 2: API Token (Fallback)

For environments where browser-based OAuth isn't available.

pip install -r requirements.txt
python scripts/auth.py login

Follow the prompts to enter your Atlassian URL, email, and API token. Credentials are stored securely in the system keyring.

Create an API token at: https://id.atlassian.com/manage-profile/security/api-tokens

Check authentication status:

python scripts/auth.py status

Logout (clears both OAuth and API token credentials):

python scripts/auth.py logout

Backend Selection

The scripts automatically detect which backend to use based on your auth type:

  • OAuth → MCP backend (calls Atlassian MCP server tools)
  • API token → REST backend (calls Atlassian REST API directly)

All commands work identically regardless of backend.

Jira (scripts/jira.py)

Search issues with JQL

python scripts/jira.py search "project = DEV AND status = Open"
python scripts/jira.py search "assignee = currentUser() ORDER BY updated DESC" --limit 10

Get issue details

python scripts/jira.py get DEV-123

Create an issue

python scripts/jira.py create --project DEV --summary "Fix login bug" --type Bug
python scripts/jira.py create --project DEV --summary "New feature" --type Story \
  --description "Details here" --priority High --assignee "user@example.com" --labels "backend,urgent"

Update an issue

python scripts/jira.py update DEV-123 --summary "Updated summary" --priority High
python scripts/jira.py update DEV-123 --assignee "user@example.com"

Transition issue status

python scripts/jira.py transition DEV-123 "In Progress"
python scripts/jira.py transition DEV-123 "Done"

Add and list comments

python scripts/jira.py comment DEV-123 --add "This is a comment"
python scripts/jira.py comment DEV-123 --list

List projects and statuses

python scripts/jira.py list-projects
python scripts/jira.py list-statuses DEV

Test authentication

python scripts/jira.py auth-info

List available MCP tools (OAuth only)

python scripts/jira.py list-tools

Confluence (scripts/confluence.py)

Search pages

python scripts/confluence.py search "deployment guide"
python scripts/confluence.py search "type=page AND space=DEV AND text~\"deployment\""
python scripts/confluence.py search "onboarding" --limit 10

Read a page

python scripts/confluence.py read <page-id>
python scripts/confluence.py read <page-id> --json

List spaces

python scripts/confluence.py list-spaces
python scripts/confluence.py list-spaces --limit 50

Get space details

python scripts/confluence.py get-space <space-id>

List pages in a space

python scripts/confluence.py list-pages --space-id <space-id>

Create a page

python scripts/confluence.py create --title "New Page" --space-id <space-id>
python scripts/confluence.py create --title "Guide" --space-id <id> --body "<p>Content here</p>"
python scripts/confluence.py create --title "Child" --space-id <id> --parent-id <parent-id>

Update a page

python scripts/confluence.py update <page-id> --title "Updated Title"
python scripts/confluence.py update <page-id> --body "<p>New content</p>"

Get child pages

python scripts/confluence.py get-children <page-id>

Test authentication

python scripts/confluence.py auth-info

List available MCP tools (OAuth only)

python scripts/confluence.py list-tools

Operations Reference

Jira

| Command | Description | Required Args |

|---------|-------------|---------------|

| search | Search issues with JQL | jql |

| get | Get issue details | issue_key |

| create | Create new issue | --project, --summary, --type |

| update | Update existing issue | issue_key |

| transition | Change issue status | issue_key, status |

| comment | Add or list comments | issue_key |

| list-projects | List accessible projects | - |

| list-statuses | List statuses for project | project_key |

| auth-info | Test API connection | - |

| list-tools | List MCP tools (OAuth only) | - |

Confluence

| Command | Description | Required Args |

|---------|-------------|---------------|

| search | Search using CQL | query |

| read | Get page content | page_id |

| list-spaces | List all spaces | - |

| get-space | Get space details | space_id |

| list-pages | List pages in a space | --space-id |

| create | Create new page | --title, --space-id |

| update | Update existing page | page_id |

| get-children | Get child pages | page_id |

| auth-info | Test API connection | - |

| list-tools | List MCP tools (OAuth only) | - |

JSON Output

Add --json flag to any script command for machine-readable output.

Token Management

Credentials stored securely using the system keyring:

  • macOS: Keychain
  • Windows: Windows Credential Locker
  • Linux: Secret Service API

Service name: atlassian-skill

OAuth tokens auto-refresh when expired (if refresh token is available).

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 424
本站分层T2
该仓技能数24
原文件路径skills/atlassian/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 24 个技能