Rework ctx - #2323
Draft
Tehforsch wants to merge 22 commits into
Draft
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure 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 FilesNone |
Tehforsch
force-pushed
the
rework-ctx
branch
6 times, most recently
from
August 4, 2026 17:18
c52dc6b to
b0ae266
Compare
Tehforsch
force-pushed
the
rework-ctx
branch
2 times, most recently
from
August 5, 2026 09:21
3f44b8e to
cf35fb2
Compare
Tehforsch
force-pushed
the
rework-ctx
branch
3 times, most recently
from
August 10, 2026 10:17
9ef5a10 to
31e5fcb
Compare
Tehforsch
force-pushed
the
rework-ctx
branch
3 times, most recently
from
August 25, 2026 04:59
4c23a24 to
3f10071
Compare
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.
Tehforsch
force-pushed
the
rework-ctx
branch
from
September 8, 2026 10:11
6d43692 to
632e963
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira: SC-1724