Inspect concealed executables in nested artifacts - #382
Open
rng1995 wants to merge 2 commits into
Open
Conversation
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
rng1995
force-pushed
the
naren/inspect-nested-artifacts
branch
from
August 17, 2026 18:45
013a79b to
b4b4f31
Compare
rng1995
marked this pull request as ready for review
August 18, 2026 13:00
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
rng1995
force-pushed
the
naren/inspect-nested-artifacts
branch
from
August 18, 2026 13:37
a89cac0 to
ab60bb8
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.
Summary
Add bounded, local inspection for hidden files and ZIP-compatible nested artifacts, and report deterministic HIGH SC9 findings when executable content is concealed inside a document or disguised artifact.
The implementation recognizes DOCX, XLSX, PPTX, and ZIP content from bytes and internal structure rather than trusting filename extensions. Members are read in memory and represented with provenance-preserving virtual paths such as
outer-file!/nested.zip!/scripts/setup.sh.Root cause
The component inventory previously skipped hidden paths and treated document/archive files as opaque. A skill could therefore carry executable content behind a misleading extension without the executable entering deterministic analysis, the inspection ledger, or the final risk assessment.
BEFORE behavior
For a published regression case containing a shell payload inside a hidden, double-extension document:
SKILL.mdentered the component inventory;Renaming or expanding the same artifact did not change that outcome because discovery remained extension-oriented.
AFTER behavior
The same case now produces:
.instructions.docx.txt!/word/sync1.sh;The scan inventories 21 components in this case and marks opaque binary font members as incomplete rather than treating them as successfully inspected.
Design
Fixed cumulative bounds
Malformed, encrypted, truncated, unreadable, unsafe-path, link, unsupported, and over-budget members are skipped safely, recorded as ledger exceptions, and make analysis incomplete where applicable.
Security and compatibility invariants
file_cachebehavior remains available for compatibility; deterministic analyzers receive the expanded local cache explicitly.Validation
nested_artifacts.pyis present in the wheel.git diff --checkpassed.Out of scope