Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
444d828
fix: simplify update command to use platform-appropriate install scripts
dkmnx Jan 28, 2026
6ed3089
feat(validate): strengthen API key validation with provider-specific …
dkmnx Jan 28, 2026
1441c29
feat(crypto): fail early on decryption failures with actionable errors
dkmnx Jan 28, 2026
7b715c4
test(integration): add tests for decryption failure scenarios
dkmnx Jan 28, 2026
760f2cb
refactor(cmd/rotate): consolidate platform detection with pkg/env
dkmnx Jan 28, 2026
5f8a698
refactor: remove redundant nil check in validateCustomProviderName
dkmnx Jan 29, 2026
47e05a4
refactor: make audit logging errors visible to callers
dkmnx Jan 29, 2026
06ffded
test: increase switch.go test coverage
dkmnx Jan 29, 2026
e565cdd
refactor(cmd): remove unnecessary dual state management in reset and …
dkmnx Jan 29, 2026
a1af487
refactor(validate): extract private IP CIDR blocks to package-level c…
dkmnx Jan 29, 2026
540f7c1
docs: standardize function documentation format in cmd and internal/a…
dkmnx Jan 29, 2026
b1bfe46
docs: add documentation to security-critical private functions
dkmnx Jan 30, 2026
a73d201
docs: add documentation to utility helper functions
dkmnx Jan 30, 2026
b773ddb
docs: add package-level documentation to cmd, crypto, and wrapper pac…
dkmnx Jan 30, 2026
c5ca62f
test(crypto): add disk full error handling tests
dkmnx Jan 30, 2026
7d073c8
test(cmd): add audit helpers tests
dkmnx Jan 30, 2026
c2bdc9d
test: fix race detection failures in integration tests
dkmnx Jan 30, 2026
fa57ccb
fix(deps): update golang.org/x/crypto to v0.45.0 to fix security vuln…
dkmnx Jan 30, 2026
5d243f1
fix(stdlib): update go directive to 1.25.6 to fix crypto/tls vulnerab…
dkmnx Jan 30, 2026
91e93ba
fix(ci): update dependency review to allow golang.org/x/crypto PATENTS
dkmnx Jan 30, 2026
12b3e63
fix(ci): update Go version to 1.25.6 and fix coverage report step
dkmnx Jan 30, 2026
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
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ["1.25.5"]
go-version: ["1.25.6"]
include:
- go-version: "1.25.5"
- go-version: "1.25.6"
latest: true
steps:
- name: Checkout code
Expand Down Expand Up @@ -223,7 +223,11 @@ jobs:
echo "# Coverage Report" > coverage-summary.md
echo "" >> coverage-summary.md
echo "All test runs completed." >> coverage-summary.md
ls -la coverage-reports/
if [ -d "coverage-reports" ]; then
ls -la coverage-reports/
else
echo "No coverage artifacts found (coverage-reports directory not created)"
fi

summary:
name: Summary
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/vulnerability-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:
actions: read

env:
GO_VERSION: "1.25.5"
GO_VERSION: "1.25.6"

jobs:
vulncheck:
Expand Down Expand Up @@ -53,6 +53,8 @@ jobs:
uses: actions/dependency-review-action@v4
with:
fail-on-severity: moderate
# Allow only permissive open-source licenses
# Current dependencies: BSD-3-Clause, MIT, Apache-2.0
allow-licenses: MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause
# golang.org/x/crypto uses Google's standard PATENTS file (BSD-3-Clause + patent grant)
# The PATENTS file is a permissive patent grant, not a restriction
# See: https://go.dev/LICENSE and https://golang.org/PATENTS
allow-licenses: GPL-2.0-only, GPL-3.0-only, AGPL-3.0-only
deny-licenses: []
28 changes: 23 additions & 5 deletions cmd/audit_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,37 @@ package cmd

import (
"fmt"
"os"

"github.com/dkmnx/kairo/internal/audit"
)

func logAuditEvent(configDir string, logFunc func(*audit.Logger) error) {
// logAuditEvent logs an audit event using the provided logging function.
//
// This function creates an audit logger, executes the provided logging function,
// and ensures the logger is properly closed. It wraps all errors with
// descriptive context for debugging.
//
// Parameters:
// - configDir: Directory containing the audit log file
// - logFunc: Function that performs the actual logging operation
//
// Returns:
// - error: Returns error if logger creation or logging fails
//
// Error conditions:
// - Returns error when unable to create audit logger (e.g., permissions, invalid directory)
// - Returns error when logFunc returns an error
//
// Thread Safety: Not thread-safe due to file I/O operations
func logAuditEvent(configDir string, logFunc func(*audit.Logger) error) error {
logger, err := audit.NewLogger(configDir)
if err != nil {
fmt.Fprintf(os.Stderr, "Warning: Failed to create audit logger: %v\n", err)
return
return fmt.Errorf("failed to create audit logger: %w", err)
}
defer logger.Close()

if err := logFunc(logger); err != nil {
fmt.Fprintf(os.Stderr, "Warning: Failed to log audit event: %v\n", err)
return fmt.Errorf("failed to log audit event: %w", err)
}
return nil
}
Loading
Loading