Repository navigation
feat: refuse chat-service webhook URLs, name the contract set in dg --version, warn on unlimited keys, honour hides in notifications - #364
Merged
Conversation
A hook's URL is public on chain and stays in its history. Discord, Slack, Teams and Google Chat incoming-webhook URLs carry their token in the path, so writing one lets anyone post to the channel. dg and the web now refuse them even when forced, and point to keeping the URL in a relay's private [[webhook]] config. A token-like segment after /webhook/ (Matrix hookshot and similar) is refused unless the writer confirms it holds nothing secret. Rust and TypeScript share the rule through webhook_url vectors. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… keys dg --version now lists, per network, the contract group this build uses, so a user can tell a binary built for another deployment. dg doctor warns when the signing key has no budget or expiry, and dg auth status says so too, with the command that registers a capped key. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The inbox now keeps the hide and unhide events its repo event feeds read and folds them with the shared reader rule, as the issue and PR lists do. A watched repo with a new issue or PR in the inbox and no followed thread gets its events read for hides. Without the contract's proof only the owner's hides count. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (38)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Removing another maintainer's hook writes a disabled revision with its URL, which the new check refused for a chat service: such a hook could not be stopped. A disabled revision is now exempt. Power Automate workflow URLs (Teams Workflows) are refused like the other chat services, and a token after /hooks/ (Mattermost, Rocket.Chat) is treated like one after /webhook/. dg webhook add's URL check moves to a helper with a test. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Review fixes: a thread's hides keep its key and writer, so a hidden comment stays hidden after the thread leaves the watch set, and a maintainer's hide never outranks the owner on the owner's thread. A failed contract read keeps the last proof flag. Hides are capped at the 500 newest threads instead of pruned by item ids. Only the five repos with the most recent new items in the last week get an event feed for hides, and a threadless feed now writes its coverage record so a thread followed later is still backfilled. Kind and property names come from the shared modules. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Owner
Author
|
@coderabbitai review 🤖 Posted autonomously by Claude on behalf of pasta. |
|
# Conflicts: # forge-web/lib/repo/webhooks.ts
# Conflicts: # docs/contracts/forge-v2.md
rules.rs: master moved repo_name vectors into run_repo_name_case; webhook_url keeps its own runner. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Four small guards from the release-readiness epic:
dg webhook addand the web's webhook form now refuse these URLs, even with--forceor the "holds nothing secret" box, and link to a new Chat services section in the relay README: keep the URL in your own relay's private[[webhook]]config. A token-like segment after/webhook/(Matrix hookshot and similar) is refused unless the writer confirms it, like a query string today.dg --versionnames the contract set. It lists, per network, the contract group this build uses (-Vstays one line):dg doctorwarns on unlimited keys. A signing key with no budget or expiry can spend the whole balance. The keys row is now a warning with the fix (dg auth login <identity file>registers a capped key), anddg auth statusprints the same warning.Why
Roadmap E10 (webhook token guard,
--versionnames the contract set) and quick win 13 (inbox honours hides,dg doctorwarns on unlimited keys).How
forge_core::webhooks::url_secretandwebhookUrlSecret(web) classify a URL by host and path. The 16 newwebhook_url__*vectors keep the two in step.check_url_and_eventsrefuses a chat-service URL whateverallow_credentialssays.dg webhook addchecks the URL before it asks for a secret or reads the chain.dg'slong_versionis built from the embedded deployment files, leaving out retired devnets.inbox.ts:withHides,visibleItems,hideWatchRepos,pruneHides.use-inboxfilters stored items throughvisibleItems. Nothing stored is deleted, so an unhide brings an item back.How tested
cargo fmt --check,cargo clippy --workspace --all-targets -D warnings,cargo test --workspace. New tests: the URL checks,webhook_urlvectors,an_unlimited_key_is_a_warning, and the--versionoutput.tsc,eslint --max-warnings=0,vitest(5671 passed). New tests: the webhook form rule, conformancewebhook_url, and the inbox hide fold (hide, unhide, owner-only without proof, hide-only feeds, pruning).dg webhook addagainst a Discord URL with--force:Limits
🤖 Generated with Claude Code