Repository navigation
fix(security): a failed shodan internetdb lookup is no ok record - #2647
Conversation
Plans the change for #2504: a Shodan InternetDB lookup that did not succeed is no ok record, the record outcome has no default, and the review and the tool show such a lookup as unchecked.
The InternetDB client gave a failed lookup the model default outcome ok and kept the record, so a review showed the address as Safe / Low Risk. - NetworkReputationRecord.outcome has no default and is ok, unavailable or failed, so a client cannot forget it. - The InternetDB client gives failed for an error and for a status other than 200, 404 and 429, and unavailable for 429 and for a domain. It keeps ok records only, so the next call asks again. - The review fallbacks name failed or unavailable, and the security_intel_network reply names no ports or CVEs for them. - A cached record with no outcome is a cache miss. Closes #2504
check_ip and check_domains_batch catch every error of their own, and the Valkey tier fails soft, so the broad except of the two fetch helpers ran only under a patch. Delete it. Test the review through init_per_file_payloads with the shared web fakes, and add no private import or patch of devops-cli.
…etDB
A reply of 200 or 404 was ok by its status alone. A proxy, a CDN or a
changed route that answers 200 with {} or 404 with an HTML page showed
every public address as safe.
Parse the 200 body as InternetDBHost (ip, ports, vulns) and the 404 body
as InternetDBNoData with pydantic. A body that does not match gives
failed, and the client does not keep it.
…lookup The reply of security_intel_network for a failed or unavailable Radar lookup still printed 'Threat Categories: None', which reads as none found. Print the reputation summary only, as the Shodan reply does.
The rank of Unchecked was 5, below Safe, so deduplication kept a Safe row over an Unchecked row of one target, and an external Unchecked row was green. Rank Unchecked after the flagged and medium statuses and before every safe one, and color it yellow in the report and in the table.
…the rank Plan the checks of the InternetDB reply bodies, the deleted fallbacks, the rank and the color of an unchecked reference, and the Radar tool reply. Record the effect on old findings.json files and name the follow-up items. Split the long sentences.
|
Test results for the head of this branch, rebased on Targeted tests. Fail-to-pass.
Follow-up items filed. Model defaults that read as clean: #2636. A Pending a person: review the diff in tuicr ( |
The change deletes two broad except blocks in pipeline.py, so the ratchet holds 2 and no longer 4.
The invariant of committed addresses refuses an RFC 1918 address in a spec. Say a private address, as the scenario means.
🤖 I have created a release *beep* *boop* --- ## [0.16.3](v0.16.2...v0.16.3) (2026-10-29) ### Bug Fixes * **security:** a failed shodan internetdb lookup is no ok record ([#2647](#2647)) ([ca9c1ad](ca9c1ad)), closes [#2504](#2504) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
A failed Shodan InternetDB lookup gave a record with the outcome
ok, and the client kept it. A review then showed the address as "Safe / Low Risk". This change makes a lookup that did not succeed read as unchecked in every place that shows it.NetworkReputationRecord.outcomehas no default, so a client cannot forget it. A cached record with no outcome is a cache miss.failedfor an error and for a status other than 200, 404 and 429. It givesunavailablefor 429 and for a domain.okonly for a 200 or a 404 with the body of InternetDB. Two pydantic models check the bodies, so a proxy that answers 200 with{}no longer shows an address as safe.okrecords only, so the next call after a failure asks again.security_intel_networkreply gives the summary only for a failed or unavailable lookup. This holds for Shodan and for Radar.Change: openspec/changes/archive/2026-10-29-2504-shodan-failed-lookup-outcome/
Closes #2504