fix: DoS protection, input sanitization, and dependency vulnerability scanning #1#435
Merged
Xhristin3 merged 15 commits intorinafcode:mainfrom Apr 28, 2026
Merged
Conversation
…, and instruction budget guards
|
@Spagero763 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
Author
|
kindly merge @RUKAYAT-CODER i have solved alot of pipeline errors |
Contributor
Author
|
@RUKAYAT-CODER kindky merge PR |
4 tasks
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.
Summary
dos_protection.rs): Introduces a dedicated module with batch-size constants, instruction-budget guards,check_batch_size,check_instruction_budget,check_bridge_out_rate_limit, and a newcheck_admin_rate_limitto throttle back-to-back bulk admin operations.emergency.rsnow enforces these guards onpause_chainsandresume_chains.validation.rs): Fixes the wrong error variant invalidate_characters(wasInvalidStringLength, now correctlyInvalidCharacters). Adds theInvalidCharactersvariant toValidationError, atrim_and_validatehelper that strips ASCII whitespace before checking length and character set, andInputSanitizer::sanitize_stringas the recommended entry-point for user-supplied string fields.ci.yml,dependabot.yml,deny.toml): Adds asecurity-auditCI job that runscargo auditandcargo denyon every push/PR. Adds Dependabot configuration for weekly Cargo and GitHub Actions dependency update PRs.Test plan
cargo auditandcargo deny checkpass in the new CI jobpause_chains/resume_chainsreject calls that exceedMAX_CHAIN_BATCH_SIZEwithBatchSizeLimitExceededpause_chains/resume_chainsreject rapid back-to-back admin calls withRetryBackoffActivevalidate_charactersreturnsInvalidCharacters(notInvalidStringLength) for disallowed bytestrim_and_validatestrips leading/trailing whitespace before applying the length capcloses #233
closes #260
closes #276