Skip to content

Fix: validate pacman signing key before allowing update#9706

Open
Naveen-Boddepalli wants to merge 3 commits intowarpdotdev:masterfrom
Naveen-Boddepalli:fix-pacman-key-validation
Open

Fix: validate pacman signing key before allowing update#9706
Naveen-Boddepalli wants to merge 3 commits intowarpdotdev:masterfrom
Naveen-Boddepalli:fix-pacman-key-validation

Conversation

@Naveen-Boddepalli
Copy link
Copy Markdown

Description

Summary

This PR improves the pacman update flow by validating the signing key before proceeding with the update.

Currently, Warp checks for the presence and expiration of the pacman signing key, but does not verify whether the key is valid at the trust level (e.g., revoked, expired, or otherwise unusable). This can lead to update failures during package installation due to signature verification errors.

Changes

  • Added parsing of the pub: line from GPG output to extract the validity field
  • Ensured only valid keys (f = full, u = ultimate) are accepted
  • Return false for invalid states (e, r, -, q) to trigger key reconfiguration
  • Preserved existing expiry checks and overall logic flow

Impact

Prevents update attempts with invalid or misconfigured pacman signing keys, improving reliability and user experience on pacman-based systems.

Happy to make further changes if needed.

Linked Issue

N/A

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Screenshots / Videos

N/A

Testing

  • Verified correctness of GPG output parsing logic
  • Ensured compatibility with existing expiry validation
  • Confirmed no changes to external interfaces or update flow beyond validation

No new tests were added as this is a small internal validation improvement.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 1, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Naveen-Boddepalli on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 1, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 1, 2026

@Naveen-Boddepalli

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @warpdotdev/oss-maintainers.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@Naveen-Boddepalli
Copy link
Copy Markdown
Author

Hi! This PR adds validation for pacman signing key validity to prevent update failures due to invalid keys. Happy to make any changes if needed.

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR updates the pacman signing-key detection path to inspect GPG's colon-formatted pub validity field before treating the key as configured, while preserving the existing expiration checks.

Concerns

  • No blocking correctness or security concerns found in the changed hunk.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@Naveen-Boddepalli
Copy link
Copy Markdown
Author

recheck

@Naveen-Boddepalli
Copy link
Copy Markdown
Author

/oz-review

2 similar comments
@Naveen-Boddepalli
Copy link
Copy Markdown
Author

/oz-review

@Naveen-Boddepalli
Copy link
Copy Markdown
Author

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 1, 2026

@Naveen-Boddepalli

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @warpdotdev/oss-maintainers.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 1, 2026

@Naveen-Boddepalli

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @warpdotdev/oss-maintainers.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 1, 2026

@Naveen-Boddepalli

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @warpdotdev/oss-maintainers.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds a pub: validity check to the pacman signing-key detection path before preserving the existing expiry validation. The change causes revoked, expired, unknown, or otherwise insufficiently trusted keys to be treated as needing reconfiguration before update.

Concerns

  • No blocking correctness or security concerns found in the changed lines.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds a GPG colon-format validity check before the existing pacman signing-key expiry validation, so invalid, revoked, expired, or untrusted keys trigger key reconfiguration before update.

Concerns

  • GnuPG documents the validity field as a leading letter that may include additional appended data in future versions; exact string matching can create false negatives. The inline suggestion keeps the same policy while parsing the documented leading letter.

Verdict

Found: 0 critical, 0 important, 1 suggestions

Approve with nits

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/autoupdate/linux.rs Outdated
Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com>
@cla-bot cla-bot Bot added the cla-signed label May 1, 2026
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds a GPG colon-format validity check before the existing pacman signing-key expiry validation, so invalid, revoked, expired, or untrusted keys trigger key reconfiguration before update.

Concerns

  • GnuPG documents the validity field as a leading letter that may include additional appended data in future versions; exact string matching can create false negatives. The inline suggestion keeps the same policy while parsing the documented leading letter.

Verdict

Found: 0 critical, 0 important, 1 suggestions

Approve with nits

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/autoupdate/linux.rs
Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds validation of the GPG pub: validity field for Warp's pacman signing key before preserving the existing expiry check. Invalid or unusable trust states now cause the update flow to reconfigure the key before running pacman.

Concerns

  • No blocking correctness or security concerns found in the changed lines.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

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

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant