Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Minion did not start the inventory service #3835

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions gui/velociraptor/src/components/timeline/timeline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -932,9 +932,10 @@ export default class TimelineRenderer extends React.Component {
renderSidebarHeader = getRootProps=>{
let icon_class = "";
let icon = "";
let enabled = _.filter(this.state.timelines, x=>x.active);
let timelines = this.state.timelines || [];
let enabled = _.filter(timelines, x=>x.active);
let all_disabled = enabled.length === 0;
let all_enabled = enabled.length === this.state.timelines.length;
let all_enabled = enabled.length === timelines.length;

if (all_enabled) {
icon = "square-check";
Expand Down
1 change: 1 addition & 0 deletions gui/velociraptor/src/themes/coolgray-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ body.coolgray-dark {
.coolgray-dark .report-viewer pre {
font-size: var(--font-size-base);
filter: invert(1);
color: var(--color-canvas-background);
background: rgba(255,255,255,.2);
border-radius: 4px;
border: none;
Expand Down
15 changes: 8 additions & 7 deletions gui/velociraptor/src/themes/github-dimmed-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -715,13 +715,14 @@ body.github-dimmed-dark {

.github-dimmed-dark .report-viewer pre {
filter: invert(1);
background: rgba(255,255,255,.05);
border-radius: 4px;
border: none;
padding-top: 2px;
padding-bottom: 2px;
padding-left: 4px;
padding-right: 4px;
background: rgba(255,255,255,.05);
color: var(--color-canvas-background);
border-radius: 4px;
border: none;
padding-top: 2px;
padding-bottom: 2px;
padding-left: 4px;
padding-right: 4px;
}

.github-dimmed-dark .report-viewer code {
Expand Down
13 changes: 7 additions & 6 deletions gui/velociraptor/src/themes/midnight.css
Original file line number Diff line number Diff line change
Expand Up @@ -912,12 +912,13 @@ body.midnight {
}

.midnight .report-viewer pre {
border-radius: 0;
border: 0.5px solid var(--color-btn-border);
padding-top: 2px;
padding-bottom: 2px;
padding-left: 4px;
padding-right: 4px;
border-radius: 0;
background: rgba(255,255,255,.05);
border: 0.5px solid var(--color-btn-border);
padding-top: 2px;
padding-bottom: 2px;
padding-left: 4px;
padding-right: 4px;
}

.midnight .report-viewer code {
Expand Down
1 change: 1 addition & 0 deletions gui/velociraptor/src/themes/ncurses-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,7 @@ body.ncurses-dark {
.ncurses-dark .report-viewer pre {
font-weight: normal;
filter: invert(1) hue-rotate(4rad);
color: var(--color-canvas-background);
border-radius: 0;
border: none;
padding-top: 2px;
Expand Down
1 change: 1 addition & 0 deletions gui/velociraptor/src/themes/veloci-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ body.veloci-dark {
.veloci-dark .report-viewer pre {
filter: invert(1);
background: rgba(255,255,255,.05);
color: var(--color-canvas-background);
border-radius: 4px;
border: none;
padding-top: 2px;
Expand Down
4 changes: 4 additions & 0 deletions services/launcher/flows.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func (self *Launcher) GetFlows(
LoadCollectionContext(ctx, config_obj,
client_id, flow_summary.FlowId)
if err == nil {
// Remove certain fields that are not necessary.
if collection_context.Request != nil {
collection_context.Request.CompiledCollectorArgs = nil
}
items = append(items, collection_context)
}
}
Expand Down
5 changes: 5 additions & 0 deletions services/notebook/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"time"

api_proto "www.velocidex.com/golang/velociraptor/api/proto"
"www.velocidex.com/golang/velociraptor/json"
"www.velocidex.com/golang/velociraptor/services"
"www.velocidex.com/golang/velociraptor/vtesting"
"www.velocidex.com/golang/velociraptor/vtesting/assert"
Expand Down Expand Up @@ -41,6 +42,10 @@ func (self *NotebookManagerTestSuite) TestNotebookStorage() {
notebooks, err = notebook_manager.GetAllNotebooks()
assert.NoError(self.T(), err)

if len(notebooks) != 1 {
json.Dump(notebooks)
}

assert.Equal(self.T(), 1, len(notebooks))
assert.Equal(self.T(), global_notebook.NotebookId, notebooks[0].NotebookId)
}
3 changes: 1 addition & 2 deletions services/orgs/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,7 @@ func (self *OrgManager) startOrgFromContext(org_ctx *OrgContext) (err error) {
// Inventory service needs to start before we import built in
// artifacts so they can add their tool dependencies.
if spec.InventoryService {
i, err := inventory.NewInventoryService(
ctx, wg, org_config)
i, err := inventory.NewInventoryService(ctx, wg, org_config)
if err != nil {
return err
}
Expand Down
1 change: 1 addition & 0 deletions services/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func MinionServicesSpec() *config_proto.ServerServicesConfig {
JournalService: true,
SchedulerService: true,
DynDns: true,
InventoryService: true,

// Run the notebook service on the minion so it can run
// notebook jobs remotely.
Expand Down
Loading