SKY-SCA-API001 · Supply chain and agent configuration
Your line uses API a dependency upgrade removed
A pull request changes a locked Python version, and a line of your code uses a public name, module, method or keyword argument that exists in the old release and not in the new one. For example, MarkupSafe 2.1.0 removed soft_unicode, so a pull request that only bumps the pin can break a file it never touched.
- Languages
- Python lockfiles, requirements*.txt pins
- Turned on by
skylos . --sca --review-upgrades --diff origin/mainon a pull request; the workflowskylos setupwrites turns this on- Quality gate
- Full scan: not checked. Diff scan: listed, not counted by the gate. Advice only: neither the built-in gate nor a Skylos Cloud gate counts it, and it is not uploaded to Cloud.
- Finding type
- review
Why it matters
Python has no compile step, so CI only catches a removed API if a test happens to run that line. Teams often leave dependency pull requests open because they can't tell which ones are safe to merge. This names the lines to read.
What Skylos flags
Removed: markupsafe==2.0.1Added: markupsafe==2.1.0import markupsafe as ms print(ms.soft_unicode("x"))What Skylos leaves alone
Removed: markupsafe==2.0.1Added: markupsafe==2.1.0from markupsafe import escape print(escape("x"))Why Skylos leaves it alone
escape exists in both releases.
How Skylos decides
- For each changed version in a lockfile or a
requirements*.txt==pin, it downloads both releases throughca9.artifactsand reads them withast. It never installs, imports or runs them, because the new release is untrusted. - It builds each release's public surface: modules, names, classes, methods and parameters, following
__all__, re-exports and star imports. Names starting with an underscore are not public. - It finds where your code uses the package, following import aliases,
fromimports, attribute access and keyword arguments. A local function or variable with the same name doesn't count. - Anything it cannot read says "could not check" instead of reporting a clean result: names behind a module
__getattr__, a computed__all__, compiled modules with no.pyi, and failed downloads. - The pull request comment says either "Review these N call sites" or "No API-level impact found in N call sites (behaviour changes not checked)". It never says an upgrade is safe.
How to fix it
Move to what the release notes name as the replacement, or stay on the old version until you can.
Removed: import markupsafe as msAdded: from markupsafe import soft_str Removed: print(ms.soft_unicode("x"))Added: print(soft_str("x"))When it can be wrong
- It searches the whole repository, so a monorepo with two services on different versions can name a line in the other service.
- "N call sites" counts references, including import lines, not only calls.
- It does not see behaviour changes, changed defaults or return types, positional argument shifts, newly required parameters, methods reached through
self.xor a return value, or string references such as Django settings. - If the old and new signatures both pass a keyword through
**kwargsand it can't be followed, the site counts as compared. The receipt'skeywords_not_followedcount shows how many. - Only Python is compared. npm bumps say so.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
On the line, with the reason. It hides that line only, and each line that uses the name is reported separately:
Python print(ms.soft_unicode("x")) # skylos: ignore[SKY-SCA-API001] migrating[tool.skylos] ignore = ["SKY-SCA-API001"]turns the rule off for the project.