Files
Mike Cohenandsnyk-bot 3a8a2417b4 Improved VQL verifier. (#4451)
1. When verifying artifacts, reported error line number now accounts
   for the yaml structure.
2. Verify new case: Defining functions in LET and calling them with
   incorrect parameters.
3. Identify calling undefined plugins or functions (previously this
   was not a warning because it could have been defined by LET
   definitions).
4. Resolving import and export sections when verifying artifacts now
   warn about misuse of imported functions which may have changed
   their definitions.
5. Uploads are now reported as Dicts instead of an upload object.
6. Dict sorting now implemented.
7. Lots of artifact bugs found by previous static analysis
8. Updated to go 1.24.0

---------

Co-authored-by: snyk-bot <[email protected]>
2025-09-16 14:11:14 +10:00

63 lines
1.6 KiB
Go

package executor
import (
"context"
"www.velocidex.com/golang/velociraptor/actions"
actions_proto "www.velocidex.com/golang/velociraptor/actions/proto"
config_proto "www.velocidex.com/golang/velociraptor/config/proto"
crypto_proto "www.velocidex.com/golang/velociraptor/crypto/proto"
"www.velocidex.com/golang/velociraptor/responder"
)
type _TestExecutor struct {
event_manager *actions.EventTable
}
func NewTestExecutor() *_TestExecutor {
return &_TestExecutor{
event_manager: &actions.EventTable{},
}
}
func NewClientExecutorForTests(config_obj *config_proto.Config) *ClientExecutor {
return &ClientExecutor{
Outbound: make(chan *crypto_proto.VeloMessage),
Inbound: make(chan *crypto_proto.VeloMessage),
event_manager: &actions.EventTable{},
config_obj: config_obj,
ctx: context.Background(),
}
}
func (self *_TestExecutor) Nanny() *NannyService {
return Nanny
}
func (self *_TestExecutor) GetClientInfo() *actions_proto.ClientInfo {
return &actions_proto.ClientInfo{}
}
func (self *_TestExecutor) FlowManager() *responder.FlowManager {
return nil
}
func (self *_TestExecutor) EventManager() *actions.EventTable {
return nil
}
func (self *_TestExecutor) ClientId() string {
return ""
}
func (self *_TestExecutor) ReadFromServer() *crypto_proto.VeloMessage {
return nil
}
func (self *_TestExecutor) SendToServer(message *crypto_proto.VeloMessage) {}
func (self *_TestExecutor) ProcessRequest(ctx context.Context,
message *crypto_proto.VeloMessage) {
}
func (self *_TestExecutor) ReadResponse() <-chan *crypto_proto.VeloMessage {
return nil
}