Skip to content

Feature/multi tenant#71

Merged
jeffersonrodrigues92 merged 3 commits intodevelopfrom
feature/multi-tenant
Feb 20, 2026
Merged

Feature/multi tenant#71
jeffersonrodrigues92 merged 3 commits intodevelopfrom
feature/multi-tenant

Conversation

@jeffersonrodrigues92
Copy link
Contributor

Pull Request Checklist

Pull Request Type

  • Feature
  • Fix
  • Refactor
  • Pipeline
  • Tests
  • Documentation
  • Helm

Checklist

Please check each item after it's completed.

  • I have tested these changes locally.
  • I have updated the documentation accordingly.
  • I have added necessary comments to the code, especially in complex areas.
  • I have ensured that my changes adhere to the project's coding standards.
  • I have checked for any potential security issues.
  • I have ensured that all tests pass.
  • I have updated the version appropriately (if applicable).
  • I have confirmed this code is ready for review.

Additional Notes

Obs: Please, always remember to target your PR to develop branch instead of main.

Generated-by: Claude
AI-Model: claude-opus-4-5-20251101
Update imports from v2 to v3 and point to published version, removing local replace directive.

X-Lerian-Ref: 0x1
@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Walkthrough

Imports in auth middleware files were updated from lib-commons/v2 to lib-commons/v3. go.mod was updated to replace lib-commons v2 with v3 and to upgrade several direct and indirect dependencies (including Fiber, gRPC, grpc-gateway, fasthttp, OpenTelemetry-related packages, and others). No application logic, middleware control flow, or exported/public API signatures were changed.

Sequence Diagram(s)

🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Feature/multi tenant' is vague and lacks specificity; it describes the category of change but not the actual technical change being made. Replace with a more descriptive title that explains the specific dependency upgrade, such as 'Upgrade lib-commons from v2 to v3 for multi-tenant support' or 'Update imports to lib-commons v3'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description follows the required template with all sections filled out and the PR type (Feature and Refactor) clearly marked, though the Additional Notes section contains only a reminder comment.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@go.mod`:
- Line 6: The go.mod currently pins github.com/LerianStudio/lib-commons/v3 to
the pre-release tag v3.0.0-beta.2; before merging to production branches replace
this with the stable release (e.g., v3.0.0 or the latest non-beta tag) in
go.mod, then update module dependencies (run go get/update and go mod tidy) and
run tests to confirm compatibility; look for the module entry
"github.com/LerianStudio/lib-commons/v3" to locate and change the version.
- Line 48: Update the OpenTelemetry SDK dependency from v1.39.0 to v1.40.0 by
changing the module requirement for go.opentelemetry.io/otel/sdk to v1.40.0
(this addresses the PATH hijack in sdk/resource/host_id.go); then run the Go
module commands to fetch and pin the new version (e.g., go get
go.opentelemetry.io/otel/sdk@v1.40.0 and go mod tidy) and rebuild/run tests to
verify nothing breaks.

require (
github.com/LerianStudio/lib-commons/v2 v2.2.0
github.com/gofiber/fiber/v2 v2.52.9
github.com/LerianStudio/lib-commons/v3 v3.0.0-beta.2
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Using beta version of lib-commons.

lib-commons/v3 v3.0.0-beta.2 is a pre-release version. This is acceptable for a feature branch targeting develop, but ensure a stable release is used before merging to production branches.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` at line 6, The go.mod currently pins
github.com/LerianStudio/lib-commons/v3 to the pre-release tag v3.0.0-beta.2;
before merging to production branches replace this with the stable release
(e.g., v3.0.0 or the latest non-beta tag) in go.mod, then update module
dependencies (run go get/update and go mod tidy) and run tests to confirm
compatibility; look for the module entry
"github.com/LerianStudio/lib-commons/v3" to locate and change the version.

go.mod Outdated
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0 // indirect
go.opentelemetry.io/otel/log v0.15.0 // indirect
go.opentelemetry.io/otel/metric v1.39.0 // indirect
go.opentelemetry.io/otel/sdk v1.39.0 // indirect
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

GO-2026-4394 vulnerability go.opentelemetry.io/otel/sdk PATH hijacking

💡 Result:

GO-2026-4394 (aliases: CVE-2026-24051, GHSA-9h8m-3fm2-qjrq) is a local PATH-hijacking → arbitrary code execution issue in the OpenTelemetry Go SDK. (osv.dev)

  • What’s vulnerable: go.opentelemetry.io/otel/sdk (reported via .../sdk/resource) on macOS/Darwin. (pkg.go.dev)
  • Root cause: resource detection executes the ioreg command via PATH lookup (no absolute path) in sdk/resource/host_id.go. If an attacker can influence the process environment (notably PATH) and place a malicious ioreg earlier in PATH, they can run code in the app’s context. (github.com)
  • Affected versions: v1.21.0 to < v1.40.0 (Go vuln DB range). (pkg.go.dev)
  • Fixed version: v1.40.0 (patch referenced as commit d45961b...). (github.com)
  • Remediation: upgrade to go.opentelemetry.io/otel/sdk v1.40.0+. (pkg.go.dev)

Citations:


🏁 Script executed:

# Check the current go.mod file to verify the version
cat -n go.mod | head -60

Repository: LerianStudio/lib-auth

Length of output: 3274


🌐 Web query:

go.opentelemetry.io/otel/sdk security advisory CVE PATH hijacking 2025 2026

💡 Result:

The OpenTelemetry Go SDK issue you’re referring to is CVE-2026-24051 (not a 2025 CVE): local PATH hijacking on macOS/Darwin leading to arbitrary code execution when the SDK’s resource detection runs the ioreg command via the ambient PATH (in sdk/resource/host_id.go). Affected: go.opentelemetry.io/otel/sdk/resource >= 1.21.0 and <= 1.39.0. Fixed: 1.40.0. [1][2]

What to do: upgrade to v1.40.0+ (e.g., go get go.opentelemetry.io/otel/sdk/resource@v1.40.0). [1][2]

Scope/notes: exploitable only on macOS/Darwin and requires an attacker who can influence the process PATH (local attack). [1][2]

Sources: [1] [2]


Upgrade go.opentelemetry.io/otel/sdk to v1.40.0 to address PATH hijacking vulnerability.

GO-2026-4394 (CVE-2026-24051) in go.opentelemetry.io/otel/sdk v1.39.0 allows arbitrary code execution on macOS/Darwin through PATH hijacking. The vulnerability occurs in sdk/resource/host_id.go where the ioreg command is executed via PATH lookup without an absolute path. An attacker with the ability to influence the process environment can place a malicious ioreg earlier in PATH to execute arbitrary code. Upgrade to v1.40.0 or later to fix this.

🧰 Tools
🪛 OSV Scanner (2.3.3)

[LOW] 48-48: go.opentelemetry.io/otel/sdk 1.39.0: OpenTelemetry Go SDK Vulnerable to Arbitrary Code Execution via PATH Hijacking in go.opentelemetry.io/otel/sdk

(GO-2026-4394)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` at line 48, Update the OpenTelemetry SDK dependency from v1.39.0 to
v1.40.0 by changing the module requirement for go.opentelemetry.io/otel/sdk to
v1.40.0 (this addresses the PATH hijack in sdk/resource/host_id.go); then run
the Go module commands to fetch and pin the new version (e.g., go get
go.opentelemetry.io/otel/sdk@v1.40.0 and go mod tidy) and rebuild/run tests to
verify nothing breaks.

@jeffersonrodrigues92 jeffersonrodrigues92 merged commit 7dc78fe into develop Feb 20, 2026
1 of 3 checks passed
@jeffersonrodrigues92 jeffersonrodrigues92 deleted the feature/multi-tenant branch February 20, 2026 22:47
@lerian-studio-midaz-push-bot
Copy link

🎉 This PR is included in version 2.5.0-beta.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@go.mod`:
- Line 48: Update the vulnerable OpenTelemetry SDK dependency: change the module
version reference for go.opentelemetry.io/otel/sdk in go.mod from v1.37.0 to
v1.40.0 or later, then run the usual Go module commands (e.g., go get
go.opentelemetry.io/otel/sdk@v1.40.0 and go mod tidy) to refresh the lockfile
and ensure all imports compile; verify no code references break after upgrading
any functions/types from the otel SDK.
- Line 6: Change the pre-release dependency to a stable release: in go.mod
replace the module version "github.com/LerianStudio/lib-commons/v3
v3.0.0-beta.2" with the latest stable semver (e.g., v3.x.y) after confirming the
stable tag is published, update any go.sum entries by running `go get
github.com/LerianStudio/lib-commons/v3@v3.x.y` and `go mod tidy`, and verify
build/tests succeed; if no stable v3 exists yet, revert to the last stable major
version or add a TODO comment and block merge until a stable release is
available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant