Skip to content

31214 linux vulns optimization - #31722

Merged
jahzielv merged 20 commits into
30738-linux-vulnsfrom
31214-linux-vulns-optimization
Aug 13, 2025
Merged

31214 linux vulns optimization#31722
jahzielv merged 20 commits into
30738-linux-vulnsfrom
31214-linux-vulns-optimization

Conversation

@jahzielv

@jahzielv jahzielv commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

Closes #31214

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements)

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

Database migrations

  • Checked table schema to confirm autoupdate

Summary by CodeRabbit

  • New Features
    • Added a new "kernels" table to enhance kernel software mapping and vulnerability processing.
    • Introduced functionality to insert mappings between kernel software and operating system versions.
  • Bug Fixes
    • Improved validation in vulnerability listing tests to ensure accurate results.
  • Tests
    • Updated and extended tests to cover kernel software mapping and verify kernel-related vulnerability queries.
  • Chores
    • Minor documentation and whitespace adjustments for improved readability.

@codecov

codecov Bot commented Aug 7, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.18812% with 19 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (30738-linux-vulns@21ef674). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...atastore/mysql/operating_system_vulnerabilities.go 82.71% 8 Missing and 6 partials ⚠️
...ns/tables/20250807141218_SoftwareIsKernelColumn.go 78.57% 2 Missing and 1 partial ⚠️
cmd/fleet/vuln_process.go 60.00% 2 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##             30738-linux-vulns   #31722   +/-   ##
====================================================
  Coverage                     ?   63.76%           
====================================================
  Files                        ?     1963           
  Lines                        ?   191662           
  Branches                     ?     6311           
====================================================
  Hits                         ?   122218           
  Misses                       ?    59888           
  Partials                     ?     9556           
Flag Coverage Δ
backend 65.15% <81.18%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jahzielv

jahzielv commented Aug 8, 2025

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 8, 2025

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@coderabbitai

coderabbitai Bot commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

A new kernels table is introduced to the database schema, along with corresponding migration and schema updates. The application logic is updated to use this table for kernel software and OS version mappings, including a new InsertKernelSoftwareMapping method in the datastore interface and implementation. Related SQL queries and tests are updated to utilize the new table and mapping logic.

Changes

Cohort / File(s) Change Summary
Vulnerability Processing Command
cmd/fleet/vuln_process.go
Added a new processing function insert_kernel_software_mapping to the vulnerability workflow, which calls the new datastore method; removed trailing whitespace in command description.
Database Schema and Migration
server/datastore/mysql/schema.sql,
server/datastore/mysql/migrations/tables/20250807141218_SoftwareIsKernelColumn.go
Added a new kernels table to the schema and migration, with columns for kernel-to-software and OS version mappings.
Datastore Interface and Implementation
server/fleet/datastore.go,
server/datastore/mysql/operating_system_vulnerabilities.go,
server/mock/datastore_mock.go
Added InsertKernelSoftwareMapping method to the interface, implemented it in the MySQL datastore and mock. Updated queries in vulnerability listing and kernel listing methods to use the new kernels table.
Unit and Integration Tests
server/datastore/mysql/operating_system_vulnerabilities_test.go,
server/service/integration_enterprise_vulns_test.go
Updated tests to call InsertKernelSoftwareMapping and validate results using the new table. Adjusted validation logic in kernel and vulnerability listing tests.

Sequence Diagram(s)

sequenceDiagram
    participant Command as vuln_process command
    participant DS as Datastore
    participant DB as Database

    Command->>DS: InsertKernelSoftwareMapping(ctx)
    DS->>DB: INSERT INTO kernels SELECT ... (mapping kernel software to OS versions)
    DB-->>DS: Result (success/error)
    DS-->>Command: error (if any)
Loading
sequenceDiagram
    participant Service as Service Layer
    participant DS as Datastore
    participant DB as Database

    Service->>DS: ListVulnsByOsNameAndVersion(...)
    DS->>DB: SELECT ... FROM kernels JOIN ...
    DB-->>DS: Vulnerability rows
    DS-->>Service: Vulnerability list
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 31214-linux-vulns-optimization

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Nitpick comments (10)
server/fleet/datastore.go (2)

1107-1108: Add brief GoDoc to clarify semantics (idempotency, scope, when to run).

A short comment here helps future maintainers understand what the mapping does, whether it’s safe to run repeatedly, and if it wraps a transaction.

Example:

// InsertKernelSoftwareMapping populates/refreshes the kernels mapping table by
// upserting kernel↔OS associations discovered from software/OS data.
// It is intended to be idempotent and safe to run multiple times.

1107-1108: Consider plural naming and returning rows affected for consistency with existing insert/upsert APIs.

Other datastore methods that insert many rows typically use plural naming and return a count (e.g., InsertOSVulnerabilities(ctx, ...) (int64, error)). Returning a count here would improve observability, tests, and logging.

Proposed interface change:

- InsertKernelSoftwareMapping(ctx context.Context) error
+ // InsertKernelSoftwareMappings upserts kernel↔OS mapping rows and returns the number of affected rows.
+ InsertKernelSoftwareMappings(ctx context.Context) (int64, error)

If you prefer to keep the existing name/signature in this PR, consider at least returning/logging counts from the implementation and we can revisit the signature in a follow-up.

server/service/integration_enterprise_vulns_test.go (1)

129-132: Replace debugging dump with an assertion.

DumpTable adds noisy logs and no guarantees. Replace it with a targeted assertion to validate mappings exist for this OS version.

Apply this diff:

-			mysql.ExecAdhocSQL(t, s.ds, func(q sqlx.ExtContext) error {
-				mysql.DumpTable(t, q, "kernels")
-				return nil
-			})
+			mysql.ExecAdhocSQL(t, s.ds, func(q sqlx.ExtContext) error {
+				var cnt int
+				if err := sqlx.GetContext(ctx, q, &cnt, `SELECT COUNT(*) FROM kernels WHERE os_version_id = ?`, osinfo.OSVersionID); err != nil {
+					return err
+				}
+				require.Equal(t, len(tt.software), cnt, "unexpected kernels mapping count for os_version_id=%d", osinfo.OSVersionID)
+				return nil
+			})
server/datastore/mysql/schema.sql (1)

1035-1035: Clarify os_version_id naming (it maps to operating_systems.id)

The name os_version_id is misleading given the referenced table is operating_systems. Consider renaming to operating_system_id for consistency, or at minimum keep the explicit FK (proposed above) so intent is clear.

If you choose to rename, remember to update:

  • the migration creating this table,
  • datastore methods (e.g., InsertKernelSoftwareMapping),
  • any SQL that reads/writes this column.
server/datastore/mysql/operating_system_vulnerabilities_test.go (2)

503-506: Prepare an expected count to enforce exact-match assertions

You build an expected set but never compute its size. Capture count for consistent checks below.

-expectedSet := make(map[string]struct{})
+expectedSet := make(map[string]struct{})
 for _, v := range tt.vulns {
   expectedSet[v.CVE] = struct{}{}
 }
+expectedCount := len(expectedSet)

521-525: Use deduped expected count for the withMeta=true case

Align the length assertion with the deduped set to avoid accidental failures if tt.vulns ever contains duplicates.

-cves, err = ds.ListVulnsByOsNameAndVersion(ctx, os.Name, os.Version, true)
+cves, err = ds.ListVulnsByOsNameAndVersion(ctx, os.Name, os.Version, true)
 require.NoError(t, err)
-require.Len(t, cves, len(tt.vulns))
+require.Len(t, cves, expectedCount)
 for _, g := range cves {
   _, ok := expectedSet[g.CVE]
   assert.True(t, ok)
 }
cmd/fleet/vuln_process.go (1)

192-197: Optional naming consistency

Most entries use a “cron_” prefix; consider renaming to cron_insert_kernel_software_mapping for consistency.

server/mock/datastore_mock.go (2)

796-797: Add brief GoDoc for exported mock func type

To satisfy linters and improve discoverability, add a short comment for this exported type.

+// InsertKernelSoftwareMappingFunc allows tests to stub Datastore.InsertKernelSoftwareMapping behavior.
 type InsertKernelSoftwareMappingFunc func(ctx context.Context) error

6265-6270: Avoid potential race by copying func under the lock before calling

Minor concurrency polish: copy the function pointer while holding the lock, then call the local variable after unlocking. This prevents a rare race if another goroutine mutates the mock func between unlock and call.

-func (s *DataStore) InsertKernelSoftwareMapping(ctx context.Context) error {
-	s.mu.Lock()
-	s.InsertKernelSoftwareMappingFuncInvoked = true
-	s.mu.Unlock()
-	return s.InsertKernelSoftwareMappingFunc(ctx)
-}
+func (s *DataStore) InsertKernelSoftwareMapping(ctx context.Context) error {
+	s.mu.Lock()
+	s.InsertKernelSoftwareMappingFuncInvoked = true
+	fn := s.InsertKernelSoftwareMappingFunc
+	s.mu.Unlock()
+	return fn(ctx)
+}

If the repo prefers explicit guardrails, consider a nil check on fn with a clear panic message to align with other mocks’ style.

server/datastore/mysql/operating_system_vulnerabilities.go (1)

274-293: Consider indexing & batching for InsertKernelSoftwareMapping

INSERT IGNORE … SELECT DISTINCT … over five joined tables will lock/scan large datasets on every run. On fleets with >100 k hosts it quickly becomes a hotspot.

Recommendations:

  1. Add a covering composite index on (software_title_id, software_id, os_version_id) in kernels.
  2. Run the insertion in smaller batches (e.g. by host-software chunk or time window) or behind a INSERT … ON DUPLICATE KEY with primary key = the same three columns to avoid full-table scans.

Not urgent for correctness but worth addressing before this code hits prod.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 21ef674 and 11a3c5d.

⛔ Files ignored due to path filters (1)
  • cmd/osquery-perf/ubuntu_2204-software.json.bz2 is excluded by !**/*.bz2
📒 Files selected for processing (8)
  • cmd/fleet/vuln_process.go (2 hunks)
  • server/datastore/mysql/migrations/tables/20250807141218_SoftwareIsKernelColumn.go (1 hunks)
  • server/datastore/mysql/operating_system_vulnerabilities.go (5 hunks)
  • server/datastore/mysql/operating_system_vulnerabilities_test.go (3 hunks)
  • server/datastore/mysql/schema.sql (1 hunks)
  • server/fleet/datastore.go (1 hunks)
  • server/mock/datastore_mock.go (3 hunks)
  • server/service/integration_enterprise_vulns_test.go (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.go

⚙️ CodeRabbit Configuration File

When reviewing SQL queries that are added or modified, ensure that appropriate filtering criteria are applied—especially when a query is intended to return data for a specific entity (e.g., a single host). Check for missing WHERE clauses or incorrect filtering that could lead to incorrect or non-deterministic results (e.g., returning the first row instead of the correct one). Flag any queries that may return unintended results due to lack of precise scoping.

Files:

  • server/datastore/mysql/migrations/tables/20250807141218_SoftwareIsKernelColumn.go
  • server/service/integration_enterprise_vulns_test.go
  • cmd/fleet/vuln_process.go
  • server/fleet/datastore.go
  • server/datastore/mysql/operating_system_vulnerabilities_test.go
  • server/datastore/mysql/operating_system_vulnerabilities.go
  • server/mock/datastore_mock.go
🧠 Learnings (2)
📚 Learning: 2025-08-08T07:40:05.274Z
Learnt from: getvictor
PR: fleetdm/fleet#31726
File: server/datastore/mysql/labels_test.go:2031-2031
Timestamp: 2025-08-08T07:40:05.274Z
Learning: Fleet repo targets Go 1.24.5 (root go.mod), which supports testing.T.Context(). Do not flag usage of t.Context() or suggest replacing it with context.Background() in tests (e.g., server/datastore/mysql/labels_test.go Line 2031 and similar).

Applied to files:

  • server/service/integration_enterprise_vulns_test.go
📚 Learning: 2025-08-01T15:08:16.858Z
Learnt from: sgress454
PR: fleetdm/fleet#31508
File: server/datastore/mysql/schema.sql:102-116
Timestamp: 2025-08-01T15:08:16.858Z
Learning: The schema.sql file in server/datastore/mysql/ is auto-generated from migrations for use with tests, so it cannot be manually edited. Any changes must be made through migrations.

Applied to files:

  • server/datastore/mysql/schema.sql
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (23)
  • GitHub Check: test-packaging (ubuntu-latest, local)
  • GitHub Check: test-go (mysql, ubuntu-latest, mysql:9.3.0, false)
  • GitHub Check: publish
  • GitHub Check: test-go (service, ubuntu-latest, mysql:9.3.0, false)
  • GitHub Check: lint (windows-latest)
  • GitHub Check: lint (macos-latest)
  • GitHub Check: lint (ubuntu-latest)
  • GitHub Check: test-go (main, ubuntu-latest, mysql:8.0.36, false)
  • GitHub Check: test-go (vuln, ubuntu-latest, mysql:8.0.36, false)
  • GitHub Check: test-go (vuln, ubuntu-latest, mysql:9.3.0, false)
  • GitHub Check: test-go (main, ubuntu-latest, mysql:9.3.0, false)
  • GitHub Check: test-go (mysql, ubuntu-latest, mysql:8.0.36, false)
  • GitHub Check: test-go (service, ubuntu-latest, mysql:8.0.36, false)
  • GitHub Check: test-go (fast, ubuntu-latest, mysql:8.0.36, false)
  • GitHub Check: test-go (integration-core, ubuntu-latest, mysql:9.3.0, false)
  • GitHub Check: test-go (integration-enterprise, ubuntu-latest, mysql:9.3.0, false)
  • GitHub Check: test-go (integration-core, ubuntu-latest, mysql:8.0.36, false)
  • GitHub Check: test-go (integration-enterprise, ubuntu-latest, mysql:8.0.36, false)
  • GitHub Check: test-go (fleetctl, ubuntu-latest, mysql:9.3.0, false)
  • GitHub Check: test-go (fleetctl, ubuntu-latest, mysql:8.0.36, false)
  • GitHub Check: test-go (integration-mdm, ubuntu-latest, mysql:9.3.0, false)
  • GitHub Check: test-go (integration-mdm, ubuntu-latest, mysql:8.0.36, false)
  • GitHub Check: build-binaries
🔇 Additional comments (4)
server/service/integration_enterprise_vulns_test.go (1)

127-127: Good placement; ensure idempotency and observable effect.

Calling InsertKernelSoftwareMapping after SyncHostsSoftwareTitles is the right spot. Please confirm the method is idempotent (no duplicate rows on repeated runs) and consider asserting expected mappings instead of relying on logs.

Do you want me to add an assertion that verifies the mapping count per os_version_id equals len(tt.software)?

server/datastore/mysql/schema.sql (1)

1031-1038: Update the kernels migration and regenerate schema.sql

The kernels table is defined in the Up_20250807141218 migration (not by hand in schema.sql). Please update that migration to:

• Use unsigned types that match the referenced tables:

  • idint unsigned
  • software_title_idint unsigned
  • software_idbigint unsigned
  • os_version_idint unsigned NOT NULL

• Add indexes on the three ID columns for join performance:

  • KEY idx_kernels_software_title_id (software_title_id)
  • KEY idx_kernels_software_id (software_id)
  • KEY idx_kernels_os_version_id (os_version_id)

• Add foreign-key constraints to enforce referential integrity:

  • FOREIGN KEY (software_title_id)software_titles(id) ON DELETE SET NULL
  • FOREIGN KEY (software_id)software(id) ON DELETE SET NULL
  • FOREIGN KEY (os_version_id)operating_systems(id) ON DELETE CASCADE

• Enforce that exactly one of software_title_id or software_id is set:

CONSTRAINT ck_kernels_one_parent CHECK (
  (software_title_id IS NOT NULL AND software_id IS NULL)
  OR (software_title_id IS NULL AND software_id IS NOT NULL)
)

After applying those changes in
server/datastore/mysql/migrations/tables/20250807141218_SoftwareIsKernelColumn.go, re-run the migration generator to update server/datastore/mysql/schema.sql.

— Example diff inside Up_20250807141218’s tx.Exec(...) SQL block:

 CREATE TABLE kernels (
-  id int NOT NULL AUTO_INCREMENT,
-  software_title_id int DEFAULT NULL,
-  software_id int DEFAULT NULL,
-  os_version_id int DEFAULT NULL,
+  id int unsigned NOT NULL AUTO_INCREMENT,
+  software_title_id int unsigned DEFAULT NULL,
+  software_id bigint unsigned DEFAULT NULL,
+  os_version_id int unsigned NOT NULL,
   PRIMARY KEY (id),
+  KEY idx_kernels_software_title_id (software_title_id),
+  KEY idx_kernels_software_id        (software_id),
+  KEY idx_kernels_os_version_id      (os_version_id),
+  CONSTRAINT fk_kernels_software_title_id FOREIGN KEY (software_title_id) REFERENCES software_titles (id) ON DELETE SET NULL,
+  CONSTRAINT fk_kernels_software_id       FOREIGN KEY (software_id)        REFERENCES software          (id) ON DELETE SET NULL,
+  CONSTRAINT fk_kernels_os_version_id     FOREIGN KEY (os_version_id)     REFERENCES operating_systems (id) ON DELETE CASCADE,
+  CONSTRAINT ck_kernels_one_parent CHECK (
+    (software_title_id IS NOT NULL AND software_id IS NULL)
+    OR (software_title_id IS NULL AND software_id IS NOT NULL)
+  )
 ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

fix_required

cmd/fleet/vuln_process.go (1)

32-36: Docstring whitespace cleanup

No functional changes. OK.

server/mock/datastore_mock.go (1)

2598-2600: Struct additions look consistent; ensure reset helpers include the new flag

Naming and pattern match existing fields (e.g., ListKernelsByOSFuncInvoked). If this mock has a reset/cleanup helper, include InsertKernelSoftwareMappingFuncInvoked in it to avoid cross-test leakage.

Comment thread cmd/fleet/vuln_process.go
Comment thread server/datastore/mysql/operating_system_vulnerabilities_test.go
Comment thread server/datastore/mysql/operating_system_vulnerabilities_test.go
Comment thread server/datastore/mysql/operating_system_vulnerabilities.go Outdated
Comment thread server/datastore/mysql/schema.sql Outdated
Comment thread server/fleet/datastore.go
@jahzielv
jahzielv requested a review from iansltx August 13, 2025 16:23

@iansltx iansltx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review WIP

Comment thread server/datastore/mysql/migrations/tables/20250807141218_SoftwareIsKernelColumn.go Outdated
Comment thread server/datastore/mysql/operating_system_vulnerabilities.go
Comment thread server/datastore/mysql/operating_system_vulnerabilities.go Outdated

@iansltx iansltx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flushing pending comments again as the only file I have left to review is tests.

}

statsStmt := `
INSERT IGNORE INTO kernel_host_counts (software_title_id, software_id, os_version_id, hosts_count, team_id)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be an ON DUPLICATE KEY UPDATE (and we'll want to add a test that fails if it isn't).

Also, we'll need to loadtest this since it's shaped completely differently than the query we had before.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed here: 0abb244

Comment thread server/datastore/mysql/operating_system_vulnerabilities.go
Comment thread server/datastore/mysql/operating_system_vulnerabilities_test.go Outdated

@iansltx iansltx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're good here.

Still needs to be data volume tested IIRC but that can be done on the feature branch.

@jahzielv
jahzielv merged commit 2396962 into 30738-linux-vulns Aug 13, 2025
40 checks passed
@jahzielv
jahzielv deleted the 31214-linux-vulns-optimization branch August 13, 2025 21:28
@jahzielv jahzielv mentioned this pull request Aug 14, 2025
8 tasks
jahzielv added a commit that referenced this pull request Aug 14, 2025
- **linux vulns API changes (#31490)**
- **31214 linux vulns optimization (#31722)**

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [x] Added/updated automated tests
- [x] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)
- [x] QA'd all new/changed functionality manually

## Database migrations

- [x] Checked table schema to confirm autoupdate
- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
BCTBB pushed a commit that referenced this pull request Aug 19, 2025
- **linux vulns API changes (#31490)**
- **31214 linux vulns optimization (#31722)**

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [x] Added/updated automated tests
- [x] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)
- [x] QA'd all new/changed functionality manually

## Database migrations

- [x] Checked table schema to confirm autoupdate
- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
@coderabbitai coderabbitai Bot mentioned this pull request Oct 1, 2025
3 tasks
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