Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Binary GPG keys (non-ASCII-armored) caused error messages to include raw binary data in terminal output, making logs unreadable.

Changes

  • armor/main.go: Remove raw line content from error messages to prevent binary data leakage
  • main.go: Detect GPG key format (ASCII-armored vs binary) and handle accordingly
    • Check for GPG packet tag magic numbers (0x95, 0x99) when armor parsing fails
    • Use binary keys directly without parsing
    • Add named constants for packet tags

Example

Before:

Downloading GPG key from: https://cli.github.com/packages/githubcli-archive-keyring.gpg
��^��*^A^P^@�Z�|�^K��^S��@ûV��ǿ^P-��u�o�a֭2�a��line found. Found '��-��u'

After:

Downloading GPG key from: https://cli.github.com/packages/githubcli-archive-keyring.gpg
[dry-run] Would add repository: deb [arch=amd64 signed-by=/usr/share/keyrings/...] ...

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 22, 2026 20:54
Co-authored-by: ericsuh <382805+ericsuh@users.noreply.github.com>
Co-authored-by: ericsuh <382805+ericsuh@users.noreply.github.com>
…ment permissions

Co-authored-by: ericsuh <382805+ericsuh@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Aptfile to prevent binary junk output Fix binary data in error output when downloading GPG keys Jan 22, 2026
Copilot AI requested a review from ericsuh January 22, 2026 21:00
@ericsuh ericsuh marked this pull request as ready for review January 22, 2026 22:08
@ericsuh ericsuh merged commit 145993f into main Jan 22, 2026
1 check passed
@ericsuh ericsuh deleted the copilot/fix-aptfile-binary-junk branch January 22, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants