ci: guard artifact name/description against unsupported claims - #49
Merged
Conversation
Adds admin/scripts/check_claim_language.py, ported from the canonical iLEAPP implementation, and wires it into the existing lint workflow as an added step in the same job. The check reads each scripts/artifacts/*.py module with ast, evaluates its __artifacts_v2__ literal, and matches the name and description of every entry against a vocabulary of phrasing that past audits found to assert what the parsed data does not establish: completeness words, attributions of an act to "the user", certainty words. Those two fields reach the examiner through the HTML report and the LAVA manifest, so a claim there is quoted in casework; PR #48 fixed them by hand and nothing has watched them since. It also fails on a stale allowlist entry, so an entry cannot outlive the description it was written for and silently shield the next claim under the same key, and prints NOT CHECKED modules on every run so the coverage hole stays visible rather than being assumed empty. Ten fields fired on first run. Nine are reworded to what the data shows; in each the trigger word was removable without losing information -- three cases of "complete <value>" describing one column, six leading "All"/"Every" over a set the following clause already scopes. The tenth is allowlisted: discordCacheRecords' match is inside its own hedge ("a partial record ... rather than a complete one"). Known coverage gap, documented in the docstring: robloxWindows.py builds __artifacts_v2__ through a helper rather than a literal, so its four Windows artifacts are not read. Their descriptions are inherited from the macOS modules, which are checked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Ports the claim-language tripwire from the canonical iLEAPP implementation and wires it into the existing Python Lint Check workflow as an added step in the same job.
What it checks
admin/scripts/check_claim_language.pyreads eachscripts/artifacts/*.pymodule withast, evaluates its__artifacts_v2__literal, and matches thenameanddescriptionof every entry against a vocabulary of phrasing past audits found to assert what the parsed data does not establish: completeness words, attributions of an act to "the user", certainty words.Those two fields are examiner-facing. They render into the HTML report, get written into the LAVA manifest, and from there get pasted into examination notes and quoted in court. PR #48 corrected them by hand across the tree; nothing has watched them since.
The check exits 1 on an unallowlisted match, exits 1 on a stale allowlist entry (one matching nothing, which would otherwise outlive the description it was written for and shield the next claim under the same key), and prints NOT CHECKED modules on every run so the coverage hole stays visible.
Triage of the ten first-run hits
Nine are reworded to what the data shows. In each the trigger word came out without losing information:
robloxCookies,robloxWebView2Cookies,robloxWindowsCookieVault-- "complete <value>" described a single column being emitted untruncated, not a record set.discordUsers,discordRecoveredMedia,robloxPlayerLog,wireDesktopLog,wireUsers,signalAttachments-- a leading "All"/"Every" over a set the following clause already scopes ("...in the cached responses this parser decodes", "...except repetitive config-restore entries"). Deleting the word weakens the sentence, so it cannot make it less accurate.One is allowlisted, with the reason inline:
discordCacheRecords's match is inside its own hedge -- "the cache evicts over time, so this index is a partial record of what the client fetched rather than a complete one".last_update_datebumped on the three entries whose date predated this change.Known coverage gap
scripts/artifacts/robloxWindows.pybuilds__artifacts_v2__through a_windows_artifact()helper that copies and mutates the dict imported from the macOS parser, so it is a call rather than a literal and cannot be read statically. Its four artifacts (robloxWindowsPresence,robloxWindowsNotifications,robloxWindowsGameJoins,robloxWindowsAccount) inherit their descriptions from the macOS modules, which are checked. This is documented by name in the script's docstring and reported as NOT CHECKED on every run.Verification
file:artifact:fieldand the matched terms (all,the user viewed). Reverted.py_compileclean on every touched file; workflow YAML parses with the new step in order.admin/scripts/lint_changed.py --base-ref origin/mainPASS (no new warnings).admin/test/: 27 passed.🤖 Generated with Claude Code