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

fix QsqueryQueryData Data type for query results api call #474

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

peterbogdan
Copy link
Contributor

@peterbogdan
Copy link
Contributor Author

@javuto should this be moved to https://github.com/jmpsec/osctrl/blob/main/types/osquery.go to avoid having to maintain multiple instances of the same type?

@javuto
Copy link
Collaborator

javuto commented Aug 9, 2024

Hmmm in osquery.go we have the standard types for osquery, and the other one is our internal type to handle data serialization. I think it better stays in db.go since it is still our internal type.

@peterbogdan
Copy link
Contributor Author

peterbogdan commented Aug 9, 2024

but would it be better to define the type in a single place and use that instead of redefining it in both logging/db.go and api/postgres.go?

to not keep 2 versions up to date when things are changing

maybe something like this:

import (
	"github.com/jmpsec/osctrl/logging"
)

var logs []logging.OsqueryQueryData

@javuto javuto self-assigned this Aug 9, 2024
@javuto
Copy link
Collaborator

javuto commented Aug 12, 2024

Okay that makes sense, and it is better to only have to maintain that type in a single place. Would you add it in this PR? Thank you for working on it! 🙏

@peterbogdan
Copy link
Contributor Author

updated

@javuto javuto self-requested a review August 13, 2024 15:53
@javuto javuto merged commit ec40194 into jmpsec:main Aug 13, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants