Langsung ke konten
Skillpedia
Keamanan18k Β· #10656

infisical-sync-skill

Fungsinya

Skill ini memberikan referensi API dan panduan keamanan untuk bekerja dengan rahasia di brankas Infisical yang dihosting sendiri, termasuk login dengan identitas mesin dan daftar rahasia. Skill ini untuk pengembang yang menyimpan kredensial di penyimpanan yang aman.

Kapan dipakai

  • βœ“Saat Anda perlu mendaftar, membaca, atau memperbarui rahasia yang tersimpan di brankas Infisical.
  • βœ“Saat agent Anda harus login ke Infisical dengan identitas mesin.
  • βœ“Saat panggilan API Infisical gagal dan Anda perlu memahami galatnya.

Link skill

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-hands/bundled/infisical-sync/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-hands/bundled/infisical-sync/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œDaftarkan nama rahasia di lingkungan staging Infisical kami agar saya bisa membandingkannya dengan berkas konfigurasi kami.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill ini memandu login dengan client ID dan client secret untuk mendapatkan token berumur pendek, lalu memanggil endpoint rahasia untuk proyek dan lingkungan yang benar.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Infisical Sync Expert Knowledge

1. Infisical API Reference

Base URL

All requests go to $INFISICAL_URL. This is the self-hosted instance base URL, e.g. https://infisical.example.com.

Authentication β€” Universal Auth

Infisical uses Machine Identities with Universal Auth for agent-to-agent communication.

Endpoint: POST /api/v1/auth/universal-auth/login

Request:

{
  "clientId": "<INFISICAL_CLIENT_ID>",
  "clientSecret": "<INFISICAL_CLIENT_SECRET>"
}

Response (success):

{
  "accessToken": "eyJ...",
  "expiresIn": 7200,
  "accessTokenMaxTTL": 43200,
  "tokenType": "Bearer"
}

curl example:

RESPONSE=$(curl -s -X POST "$INFISICAL_URL/api/v1/auth/universal-auth/login" \
  -H "Content-Type: application/json" \
  -d "{\"clientId\":\"$INFISICAL_CLIENT_ID\",\"clientSecret\":\"$INFISICAL_CLIENT_SECRET\"}")

ACCESS_TOKEN=$(echo "$RESPONSE" | python3 -c "import sys,json; print(json.load(sys.stdin)['accessToken'])")

Token lifetime: expiresIn seconds (usually 7200 = 2 hours). Re-authenticate when expired.


List Secrets

Endpoint: GET /api/v4/secrets

Query parameters:

Param Required Description
projectId Yes Infisical project ID
environment Yes Environment slug (e.g. prod, staging, dev)
secretPath No Path prefix, default /
includeImports No Include imported secrets, default false
recursive No Include secrets in sub-paths, default false

curl example:

curl -s -X GET \
  "$INFISICAL_URL/api/v4/secrets?projectId=$PROJECT_ID&environment=$ENVIRONMENT&secretPath=/" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Response shape:

{
  "secrets": [
    {
      "id": "uuid",
      "version": 1,
      "secretKey": "DATABASE_URL",
      "secretValue": "postgres://...",
      "secretComment": "",
      "environment": "prod",
      "workspace": "uuid"
    }
  ],
  "imports": []
}

Parse with:

echo "$RESPONSE" | python3 -c "
import sys, json
data = json.load(sys.stdin)
for s in data.get('secrets', []):
    print(s['secretKey'])
"

Create or Update a Secret

The API does not provide a single upsert endpoint. POST creates only (returns 409 if the secret already exists); PATCH updates only (returns 404 if missing). Use the create-then-update pattern:

Step 1 β€” Try to create (POST)
Endpoint: POST /api/v4/secrets/{secretName}

Request body:

{
  "projectId": "<PROJECT_ID>",
  "environment": "<ENV>",
  "secretValue": "<VALUE>",
  "secretPath": "/"
}
HTTP_STATUS=$(curl -s -o /tmp/infisical_response.json -w "%{http_code}" \
  -X POST "$INFISICAL_URL/api/v4/secrets/$SECRET_NAME" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"projectId\":\"$PROJECT_ID\",\"environment\":\"$ENVIRONMENT\",\"secretValue\":\"$SECRET_VALUE\",\"secretPath\":\"/\"}")

Returns 201 on success.

Step 2 β€” If 409, update via PATCH
Endpoint: PATCH /api/v4/secrets/{secretName}

if [ "$HTTP_STATUS" = "409" ]; then
  HTTP_STATUS=$(curl -s -o /tmp/infisical_response.json -w "%{http_code}" \
    -X PATCH "$INFISICAL_URL/api/v4/secrets/$SECRET_NAME" \
    -H "Authorization: Bearer $ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d "{\"projectId\":\"$PROJECT_ID\",\"environment\":\"$ENVIRONMENT\",\"secretValue\":\"$SECRET_VALUE\",\"secretPath\":\"/\"}")
fi

Returns 200 on success. Any other status code is an error.

Important: URL-encode the secret name if it contains special characters.


Delete a Secret

Endpoint: DELETE /api/v4/secrets/{secretName}

Query parameters: projectId, environment, secretPath (default /)

curl example:

curl -s -X DELETE \
  "$INFISICAL_URL/api/v4/secrets/$SECRET_NAME?projectId=$PROJECT_ID&environment=$ENVIRONMENT&secretPath=/" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

List Accessible Projects (Workspaces)

Endpoint: GET /api/v1/workspace

curl -s -X GET "$INFISICAL_URL/api/v1/workspace" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Response: { "workspaces": [{ "id": "uuid", "name": "...", "environments": [...] }] }


2. HTTP Error Codes

Code Meaning Action
200/201 Success Continue
400 Bad Request Log the response body β€” likely malformed JSON or missing
Pertanyaan umum

Apakah saya perlu identitas mesin?

Ya. Skill ini memakai Universal Auth dengan client ID dan client secret untuk login.

Berapa lama token login berlaku?

Skill ini mencatat token biasanya berlaku sekitar dua jam, setelah itu agent harus login ulang.

Dari mana alamat brankas berasal?

Itu adalah alamat Infisical yang Anda hosting sendiri, yang dibaca skill dari variabel lingkungan.

Detail

Deskripsi asli dari pembuat

Expert knowledge for the Infisical Sync Hand β€” Infisical API reference, vault operations, error patterns, security guidance

repo: RightNow-AI/openfang

Popularitas

Bintang GitHub
18k
Peringkat
#10656
Lisensi
Apache-2.0
Diperbarui
2/7/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa