Skip to content

feat(sec-core): harden skill signing pipeline and add .skill-meta layout#129

Open
1570005763 wants to merge 1 commit intomainfrom
feat-add-skill-sign-guide
Open

feat(sec-core): harden skill signing pipeline and add .skill-meta layout#129
1570005763 wants to merge 1 commit intomainfrom
feat-add-skill-sign-guide

Conversation

@1570005763
Copy link
Copy Markdown
Collaborator

Description

Harden the sign-skill.sh signing pipeline for reliability and cross-distro compatibility, and reorganise signing artifacts into a .skill-meta/ hidden directory for extensibility (versioning, permissions tracking). Key changes include precise GPG fingerprint resolution via before/after diff, gpg/gpg2 binary auto-detection for RHEL/Anolis/Alinux, batch-mode auto-registration in config.conf, and new --init / --export-key / --check convenience modes. Adds comprehensive SIGNING_GUIDE documentation (EN + CN) and a 15-case e2e test suite covering the full sign + verify workflow.

Related Issue

no-issue: hardening and documentation for existing skill-signing feature

Type of Change

  • New feature (non-breaking change that adds functionality)
  • Documentation update

Scope

  • sec-core (agent-sec-core)

Checklist

  • I have read the Contributing Guide
  • My code follows the project's code style
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the documentation accordingly
  • For sec-core (Python): Ruff format and pytest pass

Testing

# e2e test suite (15 tests covering sign + verify workflow)
cd src/agent-sec-core && pytest tests/e2e/skill-signing/e2e_test.py -v

# Integration + unit tests
cd src/agent-sec-core && pytest tests/integration-test/ tests/unit-test/ -v

Additional Notes

  • Signing artifacts moved from skill root to .skill-meta/ — the verifier has been updated accordingly, so this is backward-compatible for fresh deployments.
  • --batch mode now defaults to ~/.copilot-shell/skills/ when no directory is given.
  • New --init mode provides a zero-config quick-start for self-deployment scenarios.

@1570005763 1570005763 requested review from edonyzpc and kid9 as code owners April 8, 2026 07:02
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 8, 2026

CLA assistant check
All committers have signed the CLA.

@1570005763 1570005763 force-pushed the feat-add-skill-sign-guide branch from 0d6ea99 to 138134f Compare April 8, 2026 07:14
@1570005763 1570005763 force-pushed the feat-add-skill-sign-guide branch 2 times, most recently from d0ebf53 to 3516604 Compare April 8, 2026 09:27
@casparant casparant added the component:sec-core src/agent-sec-core/ label Apr 8, 2026
- Harden GPG key import: save/restore shell options precisely,
  resolve imported key fingerprint via before/after diff (comm -13)
- Support cross-distro gpg/gpg2 binary resolution (Alinux compat)
- Move signing artifacts (Manifest.json, .skill.sig) into .skill-meta/
  hidden directory for extensibility (versioning, permissions tracking)
- Make --batch directory optional (default: ~/.copilot-shell/skills/)
- Auto-register batch-signed directory in config.conf before signing
  to maintain manifest hash integrity for agent-sec-core
- Add comprehensive e2e test suite (15 tests) covering sign + verify
- Add SIGNING_GUIDE.md / SIGNING_GUIDE_CN.md documentation
- Update READMEs, error messages, and integration tests

Signed-off-by: 1570005763 <daniel.duan@linux.alibaba.com>
@1570005763 1570005763 force-pushed the feat-add-skill-sign-guide branch from 3516604 to 663461f Compare April 9, 2026 03:58
@kid9
Copy link
Copy Markdown
Collaborator

kid9 commented Apr 9, 2026

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:sec-core src/agent-sec-core/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants