Skip to content

Rework ctx - #2323

Draft
Tehforsch wants to merge 22 commits into
mainfrom
rework-ctx
Draft

Rework ctx#2323
Tehforsch wants to merge 22 commits into
mainfrom
rework-ctx

Conversation

@Tehforsch

@Tehforsch Tehforsch commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Jira: SC-1724

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 79c27e0.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

@Tehforsch
Tehforsch force-pushed the rework-ctx branch 6 times, most recently from c52dc6b to b0ae266 Compare August 4, 2026 17:18
@Tehforsch
Tehforsch changed the base branch from main to remove-useless-scanner-tests August 4, 2026 17:19
@Tehforsch
Tehforsch force-pushed the rework-ctx branch 2 times, most recently from 3f44b8e to cf35fb2 Compare August 5, 2026 09:21
@Tehforsch
Tehforsch force-pushed the rework-ctx branch 3 times, most recently from 9ef5a10 to 31e5fcb Compare August 10, 2026 10:17
Base automatically changed from remove-useless-scanner-tests to main August 19, 2026 07:35
@Tehforsch
Tehforsch force-pushed the rework-ctx branch 3 times, most recently from 4c23a24 to 3f10071 Compare August 25, 2026 04:59
This struct basically fulfilled no purpose other than calling `.into()`
on the filename (and introducing a generic for it) and calling (target,
ports).into().

This is a preparation for a proper split into ScanCtx/ScriptCtx split
with proper lifetime.
This is the true form of `ScanCtx` - a scan has multiple targets, not a
single one. For now, the structure is not properly set up and `VtRunner`
still creates a `ScanCtx` by itself. Also, the `target` field is still
used everywhere, so the current code little sense, but is a good
intermediate state for the next steps.
This requires addition of the context lifetime to `ScriptCtx`
This way, a `ScriptCtx` can always obtain its target autonomously, since
it has a reference to `ScanCtx` and an index into the targets on `ScanCtx`.
This is necessary because it automatically creates a key using the
target, which we don't know purely from the `ScanCtx`.
This also removes `get_port_state` which used `get_kb_item`
This test is now outdated, since VT metadata is not automatically written to
the storage anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant