Skip to content

feat: integrate Atlas Cloud provider#1672

Open
lucaszhu-hue wants to merge 1 commit into
securego:masterfrom
lucaszhu-hue:feat/atlas-cloud-provider
Open

feat: integrate Atlas Cloud provider#1672
lucaszhu-hue wants to merge 1 commit into
securego:masterfrom
lucaszhu-hue:feat/atlas-cloud-provider

Conversation

@lucaszhu-hue
Copy link
Copy Markdown

Added Atlas Cloud provider and docs.

Comment thread cmd/gosec/main.go
// Environment variable for AI API key.
aiAPIKeyEnv = "GOSEC_AI_API_KEY" // #nosec G101
aiAPIKeyEnv = "GOSEC_AI_API_KEY" // #nosec G101
atlasAPIKeyEnv = "ATLASCLOUD_API_KEY"
Comment thread autofix/ai.go

const (
AIProviderFlagHelp = `AI API provider to generate auto fixes to issues. Valid options are:
- atlas (Atlas Cloud default), atlas-deepseek-v4-flash, atlas-qwen3-coder-next, atlas-kimi-k2.6, atlas/<model-id>, atlas:<model-id>;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this a valid syntax to reference the name of any model atlas/<model-id>?

Comment thread autofix/atlas.go
import "strings"

const (
ModelAtlasDefault = "deepseek-ai/deepseek-v4-flash"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are these consts outside of this package? If not, I would use private names with lower cases.

Comment thread cmd/gosec/main.go
// Environment variable for AI API key.
aiAPIKeyEnv = "GOSEC_AI_API_KEY" // #nosec G101
aiAPIKeyEnv = "GOSEC_AI_API_KEY" // #nosec G101
atlasAPIKeyEnv = "ATLASCLOUD_API_KEY"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why these env variables required? I would just used the generic GOSEC_AI_API_KEY and make introduce something like GOSEC_AI_PROVIDER and you can set it to the specific provider like in this example atlas.

I would like to keep the name of these environment variables generic. Thanks

Comment thread .env.example
@@ -0,0 +1,5 @@
GOSEC_AI_API_KEY=your_atlas_cloud_api_key
ATLASCLOUD_API_KEY=your_atlas_cloud_api_key
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would remove this env variable. It seems duplicate to me. They need to be generic and provider agnostic.

Comment thread ATLAS_CLOUD_REVIEW.md
@@ -0,0 +1,42 @@
# Atlas Cloud Provider Review
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please remove these file.

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.

3 participants