Skip to content

Release 4.6.0 - #277

Merged
admin-sbneto merged 16 commits into
masterfrom
develop
Oct 6, 2026
Merged

admin-sbneto merged 16 commits into
masterfrom
develop

Conversation

@vhmartinezm

Copy link
Copy Markdown
Contributor

Release 4.6.0

Requires — merge order is hard

  1. Bump version: 4.5.0 → 4.6.0 #276 (Bump version: 4.5.0 → 4.6.0) must merge into develop first. Until it does, this PR promotes 4.5.0 a second time.
  2. Release 4.7.0 polyswarm-api#330 (Release 4.7.0) must merge AND publish to PyPI. This release pins polyswarm_api>=4.7.0; until it is on the index, an install from PyPI cannot satisfy it.

Pasting an indicator straight out of a threat-intel report
(hxxps[:]//evil[.]com, 127[.]0[.]0[.]1) never matched a search, and
scan url / sandbox url rejected it as an invalid URL.

The SDK now refangs the URL/domain/IP inputs of its endpoint methods;
the new root --refang/--no-refang flag (default on) is passed through as
refang_iocs. Where the CLI handles the value itself - the is_url
validation in scan url and sandbox url, and the CLI-owned submit_url
request behind metadata analyze-ip - it applies the SDK's refang_ioc via
utils.refang_input, so a defanged URL is validated in the form that is
actually submitted.

Raise the SDK floor to 4.6.0, which introduces the surface.
Capture the built request at PolyswarmSession.execute, the documented
session customization point, instead of patching _paginate/_single and
rebuilding the request with _to_request. Add the --no-refang rejection
case for sandbox url and the known add/update host cases.
Also narrow the spec's no-CLI-code list to the --url-file lines of scan url; positional scan/sandbox URLs are refanged in the CLI before validation.
…with_artifacts=)

CI installs the SDK from the same-named branch archive, so the floor names
the version the paired SDK change declares: 4.7.0, the next version above
the 4.6.0 the SDK's develop already declares for refanging. It is mergeable
once that change is on the SDK's develop, and releasable once 4.7.0 is on
PyPI.
…tadata

`search ioc <ip|domain|ttp|imphash> <value>` prints bare sha256s. With
`--with-artifacts` it asks the server for each artifact's metadata-search row
and renders it with the `metadata` formatter, the block `search metadata`
prints, so the text, json and hash output formats all apply. `output.ioc`
cannot render these rows (it indexes IOC keys a metadata row lacks).

Without the flag the SDK call is unchanged. On the sha256/sha1/md5 forward
lookup the flag is refused as a usage error rather than silently ignored.

Tests mock at the SDK boundary with autospec, so each call is a signature
check against the SDK the floor installs.
…rows

Drive sha256, sha1 and md5 through the metadata formatter on an artifact row,
and name the reverse search in the command's short help.
feat(search): ioc --with-artifacts returns the matching artifacts' metadata
@claude

claude Bot commented Oct 6, 2026

Copy link
Copy Markdown

Not mergeable yet. These are gitflow/release blockers; the code and specs are clean.

  1. No version bump in this diff. pyproject.toml only moves the SDK pin. AGENTS.md: "PyPI release happens automatically when pyproject.toml's version changes on master." Bump version: 4.5.0 → 4.6.0 #276 (4.5.0 → 4.6.0, into develop) is still open. If this merges now, master gets the refang + --with-artifacts behaviour changes and no release fires, so the published 4.5.0 and master stop matching. Merge Bump version: 4.5.0 → 4.6.0 #276 first, then confirm the version line shows up in this diff.
  2. The SDK floor can't be installed yet. polyswarm_api>=4.7.0 needs Release 4.7.0 polyswarm-api#330, which is also open/unmerged. Once (1) is done, merging releases a CLI to PyPI that nobody can install until 4.7.0 is published (specs/05-sdk-contract.md §Current floor: the floor is a hard requirement).
  3. CI is red. ci/gitlab/gitlab.com FAILURE on 068c8f7. This is probably the same unpublished-SDK problem, since on develop CI resolves the SDK by branch. Re-run it after #330 merges and before merging this.

Code, tests (Style 4 transport mocks, autospec signature checks) and spec updates all match AGENTS.md and specs/. I have nothing to flag on those.

@claude claude Bot mentioned this pull request Oct 6, 2026
@vhmartinezm
vhmartinezm requested review from mjbradford89 and sbneto and removed request for sbneto October 6, 2026 17:15
@admin-sbneto
admin-sbneto merged commit 13e9978 into master Oct 6, 2026
3 checks passed
@vhmartinezm vhmartinezm mentioned this pull request Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants