gosec
gosec copied to clipboard
feat(ai): add OpenAI and custom API provider support
- Expand AI provider support to include OpenAI (gpt-4o, gpt-4o-mini) and custom OpenAI-compatible APIs
- Add support for configuring AI API base URL and skipping SSL verification
- Update documentation to list all supported AI providers and clarify configuration options with examples
- Refactor AI client initialization to fallback on OpenAI-compatible API for unknown models
- Add OpenAI client implementation using openai-go library
- Update tests to validate OpenAI-compatible fallback behavior
- Add openai-go dependency to go.mod
@ccojocar please help to review.
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
:x: Patch coverage is 53.73134% with 31 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 64.35%. Comparing base (1216c9b) to head (3fcbbe5).
:warning: Report is 140 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| autofix/openai.go | 56.00% | 19 Missing and 3 partials :warning: |
| autofix/ai.go | 50.00% | 7 Missing and 1 partial :warning: |
| cmd/gosec/main.go | 0.00% | 1 Missing :warning: |
| :exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality. |
Additional details and impacted files
@@ Coverage Diff @@
## master #1424 +/- ##
==========================================
- Coverage 68.49% 64.35% -4.15%
==========================================
Files 75 77 +2
Lines 4384 4679 +295
==========================================
+ Hits 3003 3011 +8
- Misses 1233 1522 +289
+ Partials 148 146 -2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.