本文へ移動
cccskills
無料GitHub で公開

identity-public-keys

Maintain user-owned GPG and SSH public-key parsing, profile API registration, identity database persistence, format compatibility, and maintained OpenPGP dependencies. Excludes portal signing-key publication and admin private-key export.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md4.5 KB
  • agents/openai.yaml332 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Identity Public Keys

Ownership and Input Boundary

pkg/identity/public_key.go owns NewPublicKey and format parsing. User.AddPublicKey rejects duplicate keys; Database.AddPublicKey checks the username/email identity pair under its lock and commits the identity data. pkg/ids/local/store.go and authenticator.go dispatch AddKeyGPG/AddKeySSH. These user-owned public keys are distinct from JWT signing keys in pkg/kms.

The portal profile API calls AddUserGPGKey in pkg/authn/api_add_user_gpg_key.go. handle_api_profile.go requires a valid authenticated session, an allowed user/admin role, and a local identity store before dispatching a parsed operation. Its request body limit is one MiB. The backend identity comes from the authenticated session; request fields must not choose another user's inventory. Direct Go callers of the identity database own authorization and input-size limits; the database itself is not an HTTP authorization boundary.

OpenPGP Compatibility

Use the maintained github.com/ProtonMail/go-crypto/openpgp package pinned by go.mod; do not reintroduce golang.org/x/crypto/openpgp. The latter import predates v1.1.41 and is covered by GO-2026-5932, which lists no fixed version of that unmaintained package. Other x/crypto packages remain dependencies. Review the current advisory and maintained package guidance for future changes. Check the replacement's transitive dependencies too: ProtonMail v1.4.1 selects CIRCL v1.6.2, so this repository pins CIRCL v1.6.3 to include the fix for GO-2026-4550. A maintained direct dependency alone does not establish that its selected dependency graph is current.

The repository uses ReadArmoredKeyRing to inspect public-key metadata. It does not call OpenPGP message decryption, encryption, signing, or detached signature verification. A broad advisory or interface-based scan trace does not establish an authentication bypass or an exploitable cryptographic operation. An authenticated user can supply parsing input through the profile API, and library callers may supply it directly; retain strict errors and bounded HTTP input. Package maintenance is necessary without claiming an exploit.

Preserve the actual public format contract:

  • Accepted dispatches are RSA public PEM, ssh-rsa authorized-key text, and ASCII-armored PGP PUBLIC KEY BLOCK data with matching boundaries.
  • OpenPGP parsing requires one entity, a primary public key, and identities. Keep the existing RSA/DSA/ECDH/ECDSA algorithm policy, key ID, lowercase fingerprint, comment, normalized payload, and persisted fields stable.
  • Raw binary OpenPGP and private-key armor are not accepted by NewPublicKey. Do not describe a dependency's broader API as existing repository support.
  • This path records a public key; it does not establish external trust, ownership, revocation status, or suitability for a new cryptographic use. Preserve historical fixture import behavior, including older public keys.

Persisted PublicKey data is an identity record, not directive configuration; the migration adds no new configuration fields or parser grammar. Existing parser-package requirements apply if configurable policy is introduced later.

Validation

pkg/identity/public_key_pgp_test.go checks the legacy armored fixture's exact metadata and rejects malformed armor, invalid packets, multiple entities, private armor, and unsupported binary input. Retain existing RSA/SSH tests. server_public_key_e2e_test.go uses the public root server and real TLS login for profile upload/list, duplicate rejection, database reopen, runtime reload, and another user's empty inventory. Do not inject an authenticated user into that fixture or replace it with an in-memory parser-only test.

make test TEST_DIR='./pkg/identity .' TEST='PublicKey|PGP' COVERAGE_DIR=.coverage/identity-public-keys
make ci-check

Run a versioned vulnerability scan after dependency changes, using the selected patched Go build toolchain. Separate inherited dependency findings from newly introduced code defects, and retain the scanner output and format compatibility evidence. Never log uploaded key payloads or unrelated identity credentials.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

authdb

無料

Maintain the standalone cmd/authdb server, pkg/httpserver listener and portal routing, HTTP configuration parser, TLS, shutdown, executable tests, and deployment guidance. Use authdbctl for the management client.

日本語の概要は準備中です。原文の説明を表示しています。

greenpau/go-authcrunch602026年10月11日 更新

authdbctl

無料

Maintain cmd/authdbctl commands, flags, configuration, terminal input, management retries, output, and executable E2E tests. Use authentication-client for the reusable portal login protocol.

日本語の概要は準備中です。原文の説明を表示しています。

greenpau/go-authcrunch602026年10月11日 更新

Maintain or embed pkg/authclient for portal login, password/TOTP and API-key authentication, native credential transport, configuration parsing, and credential files. Covers authdbctl login wiring; management commands and the admin API have separate owners.

日本語の概要は準備中です。原文の説明を表示しています。

greenpau/go-authcrunch602026年10月11日 更新

Maintain conditional authentication challenge policies, reusable authchal and user-transform FromDirectives parsers, safe claim substitution, GitHub ID/organization transforms, registered-factor inventory, passwordless WebAuthn selection, verified AMR access claims, and policy revalidation across portal login, refresh, OIDC, and direct authentication.

日本語の概要は準備中です。原文の説明を表示しています。

greenpau/go-authcrunch602026年10月11日 更新

Maintain portal cookie configuration, reusable cookie directive parsing, common prefixes and explicit names, domain attributes, factory issuance/deletion, and cookie interoperability with OIDC, refresh, OAuth, and gatekeepers.

日本語の概要は準備中です。原文の説明を表示しています。

greenpau/go-authcrunch602026年10月11日 更新

Maintain optional cross-device portal login, its directive parser, QR and polling UI, approving-browser binding, single-use transfers, MFA and provider evidence, logout invalidation, and TLS/browser tests.

日本語の概要は準備中です。原文の説明を表示しています。

greenpau/go-authcrunch602026年10月11日 更新

greenpau のスキルをすべて見る

このスキルの問題を報告する