fix!: require hostname or computerId for audit file history (WYREAI-386) - #32
Merged
Merged
Conversation
ActionLogGetAllForFileHistoryV2 returns HTTP 417 Missing Parameters
unless fullPath is sent with hostname or computerId. getFileHistory
previously forwarded only fullPath (WYREAI-386).
BREAKING CHANGE: auditLog.getFileHistory now takes
{ fullPath, hostname?, computerId? } instead of a fullPath string.
Missing fullPath, or missing both hostname and computerId, throws
before the request is sent.
Co-authored-by: Aaron Sachs <asachs01@users.noreply.github.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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
EpiOn
threatlocker_audit_file_historyfails with HTTP 417 becauseauditLog.getFileHistoryonly sentfullPath. Linked from WYREAI-386 (ThreatLocker file-history 417, not the Automate pin).GET /portalapi/ActionLog/ActionLogGetAllForFileHistoryV2("Get All File History by hostname and fullpath") takes query paramsfullPath,hostname,computerId(UUID), and optionalsourceTableId,pageNumber,pageSize. The published OpenAPI spec marks every parameter optional. The live Portal API returns HTTP 417Missing Parameters. Unable to load details.unlessfullPathplus eitherhostnameorcomputerIdis present.This SDK method previously called that endpoint with
{ fullPath }only, which is the 417.Change
getFileHistorynow takes{ fullPath, hostname?, computerId?, sourceTableId?, pageNumber?, pageSize? }.fullPathis blank or bothhostnameandcomputerIdare missing (including the old string callgetFileHistory(fullPath)).sourceTableIdare forwarded when provided.{ logs }shape is still accepted.BREAKING: callers must pass an object.
@wyre-ai/node-threatlocker@^1.0.7will not pick up the major this commit requests.Tests
npm run lintandnpm test(33 tests) passed locally. Contract tests cover hostname, computerId, both identifiers, optional query params,{ logs }and bare-array bodies, and client-side rejection with zero requests.Follow-up (not in this repo)
WYRE-AI/threatlocker-mcpstill requires onlyfullPathand callsclient.auditLog.getFileHistory(fullPath)(src/domains/audit_log.ts, asserted insrc/__tests__/audit_log.test.ts). It depends on@wyre-ai/node-threatlocker@^1.0.7. After this SDK release:hostnameorcomputerIdonthreatlocker_audit_file_historyand pass{ fullPath, hostname }or{ fullPath, computerId }.Do not merge this PR from the agent.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.