Repository navigation
Capture which antivirus product is actually blocking installs, and stop discarding the false-positive submission packets - #10986
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…scarding the packets Every report of security software blocking Unsloth (#8523, #6326, #6588, #6648, #10540, #10805) named no antivirus product, no detection name and no AMSI provider. Clearance is per hash and vendors act on a detection name, so not one of those reports could be submitted anywhere, and not one of the six hardening passes since can be shown to have fixed what it aimed at. That is the gap here. ## A required-field issue form `.github/ISSUE_TEMPLATE/install-blocked-windows.yml`, a form rather than a markdown template for one reason: a form can mark a field `required` and a template cannot. Required: the product and version, the detection name exactly as displayed, the full error including the `FullyQualifiedErrorId` line, and the output of a collection script. Also a dropdown separating "the script would not run at all" from "something it created was blocked", because those are different mechanisms with different fixes and have been conflated in past reports. The script reads registered antivirus products from `root/SecurityCenter2`, resolves each AMSI provider CLSID through `InprocServer32` to a DLL and reads its `CompanyName`/`ProductName`/version, then `Get-MpComputerStatus` and recent Defender events. The provider resolution is the part that actually answers "which product", since a bare CLSID is not actionable. So is `AMRunningMode`: anything other than `Normal` means another product is primary. It downloads nothing, writes nothing, and changes nothing -- and it deliberately carries none of the shapes the installers are being cleaned of, because a diagnostic that trips the same product that blocked the installer is worthless. A test enforces that: no `Add-Type`, no `Invoke-Expression`, no base64, no `Set-MpPreference`, no `Remove-Item`, no `Start-Process`. ## The packets that were being thrown away Two false-positive submission packets are built today and discarded. `release-desktop.yml` writes a Microsoft submission packet to `$RUNNER_TEMP` and never uploads it, so `flagged-windows-bundles-*` held the flagged bundles and nothing describing them; it is now included in that artifact. And `scripts/virustotal_scan.py`'s packet went only into a job summary, which is ephemeral, so the one document written for the purpose of disputing a detection was discarded along with the run; it is now kept as an artifact. Retention on the flagged bundles goes from 7 days to 90. Clearance is per hash and a rebuild hashes differently, so those copies are the only submittable sample for that release, and a vendor round trip plus our own reaction routinely outlasts a week -- after which the evidence for the detection being disputed is gone. `test_the_scan_job_is_not_conditioned_away` allowed `if: always()` on exactly one step. The new upload needs it for the identical stated reason, "precisely so the evidence survives a failed scan", so the exception becomes a named set of two rather than a shape a future step could inherit by resembling. ## Verification - 675 passed, 6 skipped across `tests/security/` and `tests/python/test_virustotal_scan.py`. - The collection script is extracted from the YAML and **parsed**, not eyeballed. It is pasted verbatim by people who are already stuck, so a syntax error in it costs them a round trip and reports our form instead of their antivirus. It also runs end to end under pwsh on Linux, where every Windows-only facility reports itself unavailable and nothing crashes. - That guard earned itself immediately: the first draft put the script in a YAML **folded** scalar (`>`), which joins every line and silently collapsed the whole code block to nothing. The test catches that specific mistake and names it as the likely cause. - Both new guards confirmed to bite: reverting the scalar to `>` fails three tests, and making `detection-name` optional fails with the reason the field exists.
889720f to
98ccf28
Compare
…the form's labels real
Two defects found reviewing this PR, both of which would have failed silently.
## The packet was uploaded sixty lines before it was written
`Preserve flagged Windows bundles` is step 24; the packet is assembled in step 26. Steps run top to
bottom, so `${{ runner.temp }}/ms-submission-packet.md` never existed when that upload ran -- and
`if-no-files-found: ignore` would have hidden it permanently. The artefact meant to carry a vendor
submission would have held the flagged bundles and nothing describing them, which is the exact
failure this PR exists to fix, reintroduced one step higher up.
The packet now has its own upload step immediately after the step that writes it. The path is
removed from the earlier step rather than left in as harmless, because a path that cannot match is a
claim the file is covered. Removing it also avoids a side effect worth knowing: upload-artifact
computes the artefact root from glob pattern prefixes rather than matched files, so the second path
would have re-rooted that zip from flat to nested.
`if-no-files-found: ignore`, not `warn`: the packet is only assembled when there is something to
submit, so its absence on a clean release is the normal case and must not add an annotation to every
green run.
## Two of the form's three labels did not exist
`windows` and `antivirus-false-positive` were not among the repository's labels. GitHub does not
error on an unknown label, it drops it -- so every issue filed through this form would have arrived
with `bug` only, losing precisely the two triage labels the form exists to attach, with nothing
reporting the loss.
Both labels now exist on the repository, and `test_the_labels_the_form_declares_are_real` keeps the
form and the repository in step. It checks against a checked-in list rather than the GitHub API,
because a test that needs the network is a test that gets skipped.
Same reason as the sibling fix in the AMSI probe lane: tests/studio/test_pwsh_calls_use_the_shared_runner.py bans a direct subprocess call to pwsh, because a direct one shares a single $XDG_CACHE_HOME/powershell startup cache with every xdist worker and an interpreter that dies at startup then reads as the script under test having failed. Caught only by running the full suite against all ten open PRs merged into one tree; the guard lives in tests/studio/ and never ran against this branch alone.
Two defects fixed, both of which would have failed silentlyThe packet was uploaded sixty lines before it was written
The artefact meant to carry a vendor submission would have held the flagged bundles and nothing describing them: the exact failure this PR exists to fix, reintroduced one step higher up. The packet now has its own upload step immediately after the step that writes it. The path is removed from the earlier step rather than left in as harmless, because a path that cannot match is a claim the file is covered. Removing it also avoids a side effect worth knowing:
Two of the form's three labels did not exist
Both labels now exist on the repository. Also fixed here
That guard lives in Confirmed: this cannot break a release
|
…blished The collection block is a required field, so its output goes into a public issue, and it printed Path and Process Name for every Defender detection in the last two hours whether or not it had anything to do with Unsloth. On a normal machine those paths begin with the profile directory and therefore carry the account name, and the file name can be anything the person had open. The description also promised it touched no personal data, which was not true. Redact at the point of printing rather than asking the reporter to do it, since the reporter is someone whose install is already broken and who is pasting a block they did not write. Say plainly what is still printed and tell them to read it first. Verified against paths with a space in the name and with mismatched case.
|
@codex security review |
Defender renders 1116 and its siblings as a header line followed by indented 'Field: value' lines, so anchoring on '^Name:' matched none of them and the section that exists to carry the detection name, the path and the triggering process emitted a timestamp and an event id and nothing else. Measured against a message in the documented shape: the old filter selects the empty string, the new one selects all six fields. Severity is included now too, since it is free once the line is being read and it is the field that tells us whether a report is a block or a warning. The guard drives the snippet's own filter rather than asserting the regex text, so a future rewrite is judged on what it extracts.
…warn on the error field too A render: textarea wraps everything it contains in a code fence, attachments included, so the error field invited a screenshot it could never display. It keeps render: text, because it carries pasted console output where the monospace block earns its place, and screenshots get their own unrendered field. Defender localises the event field labels, so the English-only filter missed them and a non-English reporter would have sent a timestamp and an event id. Testing for an empty result is not enough: German renders Name: identically, so one match out of six looks like a successful extraction. The fallback counts instead, and prints the whole message, redacted and truncated, when fewer than two fields resolve. Measured on English, German and Japanese messages. The privacy note covered the probe output only. A PowerShell error quotes the script's location, so on the documented cloned-checkout path the required error field carries the reporter's user name and they are told to paste it verbatim before they reach that note. It now says the issue is public and suggests the substitution.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5a7418c38
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| id: probe | ||
| attributes: | ||
| label: Output of the collection script | ||
| description: | |
There was a problem hiding this comment.
Keep form descriptions within GitHub's size limit
GitHub Issue Forms cap a control's description at 200 characters, but this description is over 5,000 characters because it embeds the entire PowerShell script, so GitHub will reject the template rather than offer it to reporters. The same file also contains labels longer than 50 characters and other descriptions longer than 200 characters, so move the long guidance and script into separate markdown body items and shorten every control's label and description to the schema limits.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I checked this one against GitHub rather than against the docs, and it does not hold. There is no documented 200-character cap on a control's description, and the SchemaStore github-issue-forms schema that encodes the syntax carries no maxLength on label or description at all (the only one in the file is 39, on assignees).
More directly: GitHub's own validator accepts this file. Opening it on the branch renders the Preview tab with every field present, including the 5,185-character description with the script in it, rather than a template error. If it were rejected the preview is where that would show.
Moving the script into a markdown item is a reasonable style preference, but it is not a fix for a rejection that is not happening, and the script has to stay inside a field the reporter can see next to the box they paste into.
The error and probe fields say the issue is public and show what to write instead, but the file path field asked for a full path with only a profile-shaped placeholder to follow, so a reporter doing what it says publishes their user name. Give it the same warning and the same worked replacement.
…erence The username replacement rewrote every case-insensitive occurrence anywhere in the line, so an account named win rewrote Windows Defender and one named cat rewrote Wacatac. Those are the product and detection names the form exists to collect, and the reporter cannot see it happen. Require a path separator before the name and no word character after it. The probe also set ErrorActionPreference at the prompt, which persists for the rest of that session, against the field's own promise that it changes nothing. Run the body in a script block so the assignment is scoped to it.
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…op discarding the false-positive submission packets (unslothai#10986) * Capture the evidence six reports of this never contained, and stop discarding the packets Every report of security software blocking Unsloth (unslothai#8523, unslothai#6326, unslothai#6588, unslothai#6648, unslothai#10540, unslothai#10805) named no antivirus product, no detection name and no AMSI provider. Clearance is per hash and vendors act on a detection name, so not one of those reports could be submitted anywhere, and not one of the six hardening passes since can be shown to have fixed what it aimed at. That is the gap here. ## A required-field issue form `.github/ISSUE_TEMPLATE/install-blocked-windows.yml`, a form rather than a markdown template for one reason: a form can mark a field `required` and a template cannot. Required: the product and version, the detection name exactly as displayed, the full error including the `FullyQualifiedErrorId` line, and the output of a collection script. Also a dropdown separating "the script would not run at all" from "something it created was blocked", because those are different mechanisms with different fixes and have been conflated in past reports. The script reads registered antivirus products from `root/SecurityCenter2`, resolves each AMSI provider CLSID through `InprocServer32` to a DLL and reads its `CompanyName`/`ProductName`/version, then `Get-MpComputerStatus` and recent Defender events. The provider resolution is the part that actually answers "which product", since a bare CLSID is not actionable. So is `AMRunningMode`: anything other than `Normal` means another product is primary. It downloads nothing, writes nothing, and changes nothing -- and it deliberately carries none of the shapes the installers are being cleaned of, because a diagnostic that trips the same product that blocked the installer is worthless. A test enforces that: no `Add-Type`, no `Invoke-Expression`, no base64, no `Set-MpPreference`, no `Remove-Item`, no `Start-Process`. ## The packets that were being thrown away Two false-positive submission packets are built today and discarded. `release-desktop.yml` writes a Microsoft submission packet to `$RUNNER_TEMP` and never uploads it, so `flagged-windows-bundles-*` held the flagged bundles and nothing describing them; it is now included in that artifact. And `scripts/virustotal_scan.py`'s packet went only into a job summary, which is ephemeral, so the one document written for the purpose of disputing a detection was discarded along with the run; it is now kept as an artifact. Retention on the flagged bundles goes from 7 days to 90. Clearance is per hash and a rebuild hashes differently, so those copies are the only submittable sample for that release, and a vendor round trip plus our own reaction routinely outlasts a week -- after which the evidence for the detection being disputed is gone. `test_the_scan_job_is_not_conditioned_away` allowed `if: always()` on exactly one step. The new upload needs it for the identical stated reason, "precisely so the evidence survives a failed scan", so the exception becomes a named set of two rather than a shape a future step could inherit by resembling. ## Verification - 675 passed, 6 skipped across `tests/security/` and `tests/python/test_virustotal_scan.py`. - The collection script is extracted from the YAML and **parsed**, not eyeballed. It is pasted verbatim by people who are already stuck, so a syntax error in it costs them a round trip and reports our form instead of their antivirus. It also runs end to end under pwsh on Linux, where every Windows-only facility reports itself unavailable and nothing crashes. - That guard earned itself immediately: the first draft put the script in a YAML **folded** scalar (`>`), which joins every line and silently collapsed the whole code block to nothing. The test catches that specific mistake and names it as the likely cause. - Both new guards confirmed to bite: reverting the scalar to `>` fails three tests, and making `detection-name` optional fails with the reason the field exists. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Upload the submission packet after the step that writes it, and make the form's labels real Two defects found reviewing this PR, both of which would have failed silently. ## The packet was uploaded sixty lines before it was written `Preserve flagged Windows bundles` is step 24; the packet is assembled in step 26. Steps run top to bottom, so `${{ runner.temp }}/ms-submission-packet.md` never existed when that upload ran -- and `if-no-files-found: ignore` would have hidden it permanently. The artefact meant to carry a vendor submission would have held the flagged bundles and nothing describing them, which is the exact failure this PR exists to fix, reintroduced one step higher up. The packet now has its own upload step immediately after the step that writes it. The path is removed from the earlier step rather than left in as harmless, because a path that cannot match is a claim the file is covered. Removing it also avoids a side effect worth knowing: upload-artifact computes the artefact root from glob pattern prefixes rather than matched files, so the second path would have re-rooted that zip from flat to nested. `if-no-files-found: ignore`, not `warn`: the packet is only assembled when there is something to submit, so its absence on a clean release is the normal case and must not add an annotation to every green run. ## Two of the form's three labels did not exist `windows` and `antivirus-false-positive` were not among the repository's labels. GitHub does not error on an unknown label, it drops it -- so every issue filed through this form would have arrived with `bug` only, losing precisely the two triage labels the form exists to attach, with nothing reporting the loss. Both labels now exist on the repository, and `test_the_labels_the_form_declares_are_real` keeps the form and the repository in step. It checks against a checked-in list rather than the GitHub API, because a test that needs the network is a test that gets skipped. * Start pwsh through the shared runner here too Same reason as the sibling fix in the AMSI probe lane: tests/studio/test_pwsh_calls_use_the_shared_runner.py bans a direct subprocess call to pwsh, because a direct one shares a single $XDG_CACHE_HOME/powershell startup cache with every xdist worker and an interpreter that dies at startup then reads as the script under test having failed. Caught only by running the full suite against all ten open PRs merged into one tree; the guard lives in tests/studio/ and never ran against this branch alone. * Redact the profile directory and account name before the report is published The collection block is a required field, so its output goes into a public issue, and it printed Path and Process Name for every Defender detection in the last two hours whether or not it had anything to do with Unsloth. On a normal machine those paths begin with the profile directory and therefore carry the account name, and the file name can be anything the person had open. The description also promised it touched no personal data, which was not true. Redact at the point of printing rather than asking the reporter to do it, since the reporter is someone whose install is already broken and who is pasting a block they did not write. Say plainly what is still printed and tell them to read it first. Verified against paths with a space in the name and with mismatched case. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Match the Defender event fields, which are indented Defender renders 1116 and its siblings as a header line followed by indented 'Field: value' lines, so anchoring on '^Name:' matched none of them and the section that exists to carry the detection name, the path and the triggering process emitted a timestamp and an event id and nothing else. Measured against a message in the documented shape: the old filter selects the empty string, the new one selects all six fields. Severity is included now too, since it is free once the line is being read and it is the field that tells us whether a report is a block or a warning. The guard drives the snippet's own filter rather than asserting the regex text, so a future rewrite is judged on what it extracts. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Give screenshots their own field, survive localised Defender labels, warn on the error field too A render: textarea wraps everything it contains in a code fence, attachments included, so the error field invited a screenshot it could never display. It keeps render: text, because it carries pasted console output where the monospace block earns its place, and screenshots get their own unrendered field. Defender localises the event field labels, so the English-only filter missed them and a non-English reporter would have sent a timestamp and an event id. Testing for an empty result is not enough: German renders Name: identically, so one match out of six looks like a successful extraction. The fallback counts instead, and prints the whole message, redacted and truncated, when fewer than two fields resolve. Measured on English, German and Japanese messages. The privacy note covered the probe output only. A PowerShell error quotes the script's location, so on the documented cloned-checkout path the required error field carries the reporter's user name and they are told to paste it verbatim before they reach that note. It now says the issue is public and suggests the substitution. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Warn on the issue form field that asks for a full path The error and probe fields say the issue is public and show what to write instead, but the file path field asked for a full path with only a profile-shaped placeholder to follow, so a reporter doing what it says publishes their user name. Give it the same warning and the same worked replacement. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Redact only real account components, and scope the probe's error preference The username replacement rewrote every case-insensitive occurrence anywhere in the line, so an account named win rewrote Windows Defender and one named cat rewrote Wacatac. Those are the product and detection names the form exists to collect, and the reporter cannot see it happen. Require a path separator before the name and no word character after it. The probe also set ErrorActionPreference at the prompt, which persists for the rest of that session, against the field's own promise that it changes nothing. Run the body in a script block so the assignment is scoped to it. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
The gap
Six reports of security software blocking Unsloth (#8523, #6326, #6588, #6648, #10540, #10805) named no antivirus product, no detection name and no AMSI provider. False-positive clearance is per hash, and every vendor submission form asks for the detection name. So not one of those six could be submitted anywhere, and not one of the six hardening passes since (#7822, #8586, #6326, #10540, #10560, #10504) can be shown to have fixed what it aimed at.
This PR is additive. No installer changes.
A required-field issue form
.github/ISSUE_TEMPLATE/install-blocked-windows.yml. A form rather than a markdown template for exactly one reason: a form can mark a fieldrequiredand a template cannot.Required: the product and version, the detection name exactly as displayed, the full error including the
FullyQualifiedErrorIdline, and the output of a collection script. There is also a dropdown separating "the script would not run at all" from "something it created was blocked" -- those are different mechanisms with different fixes, and past reports have conflated them.The collection script reads registered antivirus products from
root/SecurityCenter2, resolves each AMSI provider CLSID throughInprocServer32to a DLL and reads itsCompanyName/ProductName/version, thenGet-MpComputerStatusand recent Defender events. The provider resolution is the part that actually answers "which product", since a bare CLSID is not actionable. So isAMRunningMode: anything other thanNormalmeans another product is primary.It downloads nothing, writes nothing and changes nothing, and it deliberately carries none of the shapes the installers are being cleaned of. A diagnostic that trips the same product that blocked the installer is worthless, so a test enforces that: no
Add-Type, noInvoke-Expression, no base64, noSet-MpPreference, noRemove-Item, noStart-Process.The packets that were being thrown away
Two false-positive submission packets are built today and discarded.
release-desktop.ymlwrites a Microsoft submission packet to$RUNNER_TEMPand never uploads it, soflagged-windows-bundles-*held the flagged bundles and nothing describing them. It is now included in that artifact.scripts/virustotal_scan.py's packet went only into a job summary, which is ephemeral. The one document written for the purpose of disputing a detection was discarded with the run. It is now kept as an artifact.Retention on the flagged bundles goes from 7 days to 90. Clearance is per hash and a rebuild hashes differently, so those copies are the only submittable sample for that release, and a vendor round trip plus our own reaction routinely outlasts a week, after which the evidence for the detection being disputed is gone.
test_the_scan_job_is_not_conditioned_awayallowedif: always()on exactly one step. The new upload needs it for the identical stated reason, "precisely so the evidence survives a failed scan", so the exception becomes a named set of two rather than a shape a future step could inherit by resembling.Verification
tests/security/andtests/python/test_virustotal_scan.py.pwshon Linux, where every Windows-only facility reports itself unavailable and nothing crashes.>), which joins every line and silently collapsed the whole code block to nothing. The test catches that specific mistake and names it as the likely cause.>fails three tests, and makingdetection-nameoptional fails with the reason the field exists.