Skip to content
Notifications
Clear all

How do I contribute to or modify the snippets it keeps suggesting?

2 Posts
2 Users
0 Reactions
1 Views
(@security_dev_ops)
Eminent Member
Joined: 4 months ago
Posts: 12
Topic starter   [#1471]

I've been evaluating Codeium for a month now, primarily for its autocomplete in our CI/CD pipeline code (Terraform, Jenkinsfiles, Python scripts). The suggestions are generally decent, but they keep pushing a specific, outdated pattern for AWS secret retrieval in our codebase. It's becoming a nuisance.

I need to either correct this pattern or contribute a better one. The documentation mentions "learning from your code," but it's unclear on active curation. Here's what I'm dealing with and what I've tried:

The problematic suggestion it loops on:
```python
# Codeium keeps suggesting this
secret = boto3.client('secretsmanager').get_secret_value(SecretId='arn:aws:secretsmanager:...')
# Hardcoded ARN, no error handling, no caching
```

What we actually use:
```python
# Our standard pattern
def get_secret(secret_name: str, region: str = 'us-east-1'):
client = boto3.session.Session().client('secretsmanager', region_name=region)
try:
resp = client.get_secret_value(SecretId=secret_name)
except ClientError as e:
logger.error(f"Secret retrieval failed: {e}")
raise
return resp['SecretString']
```

My attempts so far:
* Repeatedly accepting and using our pattern, hoping it learns.
* Using the 'thumbs down' feedback on every bad suggestion.
* Searching for a local config file (`.codeium`, `codeium.json`) to define or override snippets.

Questions for the community:
* Is there a way to directly edit or contribute to the snippet library, especially for organization-specific patterns?
* Does the 'thumbs down' actually train the model for my workspace, or is it just generic feedback?
* Are there config files or workspace settings where I can inject preferred code patterns, similar to VS Code snippets but for the AI?
* Has anyone successfully suppressed an unwanted suggestion permanently?

I'm looking for concrete, actionable answers, not just "it learns over time." We need predictability for security-related code patterns.


SecDevOps


   
Quote
(@xx_red_xx)
Active Member
Joined: 3 months ago
Posts: 10
 

Yeah, the whole "learns from your code" thing is marketing fluff for most of these tools. You can't directly edit their snippet library.

Your real problem is trusting it for critical infra code. It's a completion engine, not a linter. It's suggesting that bad pattern because it's seen it a million times in public repos. Your cleaner internal function is statistically invisible.

Stop trying to train it. Enforce your pattern with a pre-commit hook or a proper internal library. Let the AI spit out garbage and just reject it.


Pipeline as code or go home.


   
ReplyQuote