You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
swift: api rule matches bare 'open' anywhere, including inside string literals #2544
Found by the #1096 control corpus: swift's api rule matches the bare word open anywhere — including inside string literals and any identifier/prose use — not just as an access modifier position.
Evidence
data/swift/b.swift plants zero api keywords; the string decoy let note = "if eval fails, try open" records api = 1. finditer on the api rule returns ['open'] from inside the literal.
Impact
Any swift file whose strings, comments-adjacent code, or function names contain open (e.g. openFile, wait — boundary-guarded, but bare open(...) calls and prose in literals) gains API-exposure mass. open is a common verb; as an access modifier it only means anything pre-declaration.
Fix shape
Anchor open to declaration position (^[ \t]*open[ \t]+(?:class|func|var|...)) like the other modifiers presumably are, and/or rely on literal shielding once #2535 is settled.
References
#1096 corpus ledger + #2535 (literal-surface counting is the enabling half of this FP).
Shipped in #2677 (B.3 wave 1 of #2669): swift's api rule now steps bounded modifiers instead of matching bare open anywhere; strict tests in tests/extraction/languages/test_swift_strict.py. Stayed open because #2677's Closes was a comma-list, which GitHub parses only for the first reference. Closing as done.
Activity
chore(crucible): re-bless golden masters for the B.3 wave-1 regex batch
fix(core-engine): Rosetta batch 3 wave 1 — five registry-regex fixes …
squid-protocol commentedon Sep 4, 2026
Shipped in #2677 (B.3 wave 1 of #2669): swift's api rule now steps bounded modifiers instead of matching bare
openanywhere; strict tests intests/extraction/languages/test_swift_strict.py. Stayed open because #2677'sCloseswas a comma-list, which GitHub parses only for the first reference. Closing as done.