Conversation
…anitized inputs check Expand the GitHub Sanitized Inputs check to cover more ecosystems and libraries, and tighten the Python matcher so false positives on substrings (e.g. "schema" inside "jsonschema") and comments no longer pass. - JS/TS: zod (existing) + yup, joi, @effect/schema, effect, valibot, ajv, class-validator, io-ts, superstruct, runtypes - Python: pydantic (existing) + marshmallow, cerberus, voluptuous, jsonschema, schematics, typeguard - PHP: new — laravel/framework, respect/validation, symfony/validator, vlucas/valitron (detected via composer.json) - Python matcher rewritten to parse lines, strip comments, and match package names as standalone tokens - Failure message updated to list all supported libraries so customers know what we check for Closes customer complaints surfaced in Slack (Yup, Joi, Marshmallow, Effect Schema, Laravel). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@cubic-dev-ai review it |
@tofikwest I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/integration-platform/src/manifests/github/checks/sanitized-inputs.ts">
<violation number="1" location="packages/integration-platform/src/manifests/github/checks/sanitized-inputs.ts:198">
P2: The Python matcher strips all `#` fragments, which breaks detection for valid VCS requirements like `...#egg=pydantic`. Strip only actual comments instead of splitting at the first `#`.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
Only strip actual comments (# preceded by whitespace or at line start) so VCS requirements like `git+https://...#egg=pydantic` remain matchable. Also add `=` to the leading separator set so the package name inside `#egg=<name>` is recognized as a standalone token. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/integration-platform/src/manifests/github/checks/sanitized-inputs.ts">
<violation number="1" location="packages/integration-platform/src/manifests/github/checks/sanitized-inputs.ts:201">
P2: The new comment-stripping regex is requirements-specific and can mis-parse `pyproject.toml` inline comments, causing false validation-library matches.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
…ject.toml
The previous strip-on-whitespace-# regex was requirements.txt-specific and
left inline TOML comments intact when `#` had no preceding whitespace (e.g.
`["requests"]# pydantic`), causing false-positive library matches.
Dispatch on file name:
- pyproject.toml (TOML): strip `#.*$` anywhere — `#` is a comment outside
strings, and dep values are always quoted so VCS names still match via
the preceding `"name @ ...` prefix.
- requirements.txt (pip): keep `(^|\s)#.*$` — `#` only starts a comment
when preceded by whitespace, so VCS `#egg=name` fragments survive.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Requires human review: This PR introduces non-trivial parsing logic (regex-based line processing) and expands the check to a new ecosystem (PHP), which warrants human review for correctness.
|
🎉 This PR is included in version 3.27.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
composer.json— new ecosystem, same architectureschemainsidejsonschema) and comment mentions no longer trigger a passWhat changed
One file:
packages/integration-platform/src/manifests/github/checks/sanitized-inputs.tsLibrary coverage
zodzod, yup, joi, @effect/schema, effect, valibot, ajv, class-validator, io-ts, superstruct, runtypespydanticpydantic, marshmallow, cerberus, voluptuous, jsonschema, schematics, typeguardlaravel/framework, respect/validation, symfony/validator, vlucas/valitronPython matcher fix
Before: loose
content.toLowerCase().includes(candidate)— matched substrings anywhere, including in comments and inside other package names.After: line-based regex that strips comments (
#) and requires the package name to appear as a standalone token with appropriate leading/trailing separators (whitespace, version operators==/>=/<=/!=/~=, brackets, quotes, commas, semicolons). This is the tightening that makes expanding the Python list safe.Failure message
Updated to list all supported libraries and mention
composer.jsonso customers can self-diagnose why their repo failed and know which libraries we check for.What is NOT in this PR
run, would require a refactor to extract them as module-level exports. Happy to do this as a follow-up PR.Risk / compatibility
zodandpydanticdetection paths are preserved.#egg=namesyntax (e.g.git+https://github.com/x/y.git@v1.0#egg=pydantic) will no longer match because we now strip at#. This pattern is rare, and the old match only caught it incidentally via the broken loose-match.# TODO: migrate off pydantic) no longer cause a false pass. This is a correctness improvement, not a regression.Test plan
yup→ passes on validation sidejoi→ passesmarshmallowinrequirements.txt→ passespydanticin a comment but not in deps → fails (was previously false-passing)jsonschema==4.0.0→ correctly matchesjsonschema, does not incorrectly match on substringscomposer.jsonwithlaravel/framework) → passesrespect/validation→ passesValidation done locally
bun run buildinpackages/integration-platform→ cleantsc --noEmitonpackages/integration-platform→ exit 0origin/mainunrelated to this change (verified by stashing and re-running)🤖 Generated with Claude Code
Summary by cubic
Expands the Sanitized Inputs check to detect many more validation libraries across JS/TS, Python, and PHP, and adds
composer.jsonscanning. Updates the failure message to list supported libraries and tightens Python matching with TOML-aware comment stripping while preserving VCS#egg=.New Features
zod,yup,joi,@effect/schema,effect,valibot,ajv,class-validator,io-ts,superstruct,runtypes.pydantic,marshmallow,cerberus,voluptuous,jsonschema,schematics,typeguard.composer.jsonlaravel/framework,respect/validation,symfony/validator,vlucas/valitron.Bug Fixes
git+...#egg=pydantic.pyproject.tomlto prevent inline#false positives.Written for commit 2cf8979. Summary will update on new commits.