Repository navigation
fix(tools): harden link redirects, CFF sync guards, release regex, and CLI import validation - #437
Open
aghassemlouei wants to merge 1 commit into
Open
aghassemlouei wants to merge 1 commit into
aghassemlouei wants to merge 1 commit into
Conversation
…, and CLI import validation Fixes #436
aghassemlouei
marked this pull request as ready for review
November 17, 2026 18:39
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.
Description
Hardens five self-contained repository maintenance tools and CLI validation helpers so each check can be reviewed and exercised locally via unit tests:
cli/src/stellar_engine/config/validate.py: Restricts quoted string index keys in_INDEX(import_address_problems) to printable characters and valid HCL string escapes (\\,\",\n,\r,\t) while rejecting HCL template interpolation and directive prefixes (${,%{) and raw control characters (\x00–\x1f,\x7f).tools/check_links.py: Disables automaticrequests.getredirect following (allow_redirects=False) and validates URL scheme (http/https) and resolved IP addresses against private, loopback, link-local, reserved, multicast, and unspecified ranges across each redirect hop up toMAX_REDIRECTS = 5.tools/cff-sync-pr.sh: Resolves the target repository owner fromGITHUB_REPOSITORY(falling back togh repo view) and passes--head "${REPO_OWNER}:${SYNC_BRANCH}"so open branches namedchore/cff-syncon external forks cannot matchNUMBER.tools/sync-from-cff.sh: Addscheck_safe_pathbefore creating directories, writing files, or deleting paths so sync writes reject..components and symlinked parent directories, and verifies[[ ! -L "${root}/versions.tf" ]]before runningsed -E -i.bakonversions.tf.tools/release_please.py: Replaces unanchored<!--\s*(?:breaking|release)-note:\s*(.*?)\s*-->regexes with linear-time_extract_comment_note()scanning and single-line[ \t]*([^\r\n]+)$trailer matching, eliminating polynomial backtracking on unclosed HTML comments.Fixes #436
Type of Change
Deployment & Compliance Impact
Checklist
Code Quality & Reusability
modules/orfast/stages-aw/can be leveraged for this change.docs/naming-convention.md.Documentation
README.mdof the modified module or blueprint.Security
Testing
Testing Performed
--config ruff.toml), and Apache 2.0 header checks (tests/test_check_links.py,tests/test_release_please.py, and fullpytestsuite).bash tests/test_cff_sync_pr.sh,bash tests/test_sync_from_cff.sh,bash tests/test_shell_syntax.sh, andshellcheck).cliRuff lint/format,pyright, andpytest(tests/test_config_validate.pyandtests/test_render_imports.py, includingterraform validateandterraform fmt -checkworkspace checks).