ayush585 / ayush585/edgex

Security: Exposed Groq API Key in .env

Open
#102 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13
Forks
36
PR merge metrics
No merged PRs in 30d

Description

## Security Alert: Exposed API Key Detected

Hi there,

I'm [Zak Cole](https://crap.dev), a security researcher. I run automated scans to help developers identify accidentally exposed API credentials before malicious actors find them.

### What I Found

**File:** `.env`
**Key Type:** Groq
**Exposed Key (redacted):** `gsk_14VI********************************************wDeu`

### Why This Matters

Exposed API keys can lead to:
- **Unauthorized charges** on your account (AI API calls can get expensive fast)
- **Data exfiltration** if the key has access to your resources
- **Abuse** of your account for spam, attacks, or other malicious activity

### Recommended Actions

1. **Immediately revoke this key** in your Groq dashboard
2. **Generate a new key** and store it securely (environment variables, secrets manager)
3. **Check your usage** for any unauthorized activity
4. **Add `.env` to your `.gitignore`** to prevent future leaks

### How to Store Secrets Properly

```bash
# .gitignore
.env
.env.*
*.env
```

Load from environment instead of hardcoding:
```python
import os
api_key = os.environ.get("API_KEY")
```

---

This is an automated disclosure from a public service I run to help secure the open source ecosystem. No keys were stored or used, only pattern-matched and reported.

**Need help building a secure application?** I'm available for consulting and development work. Reach out if you want help shipping something that doesn't leak credentials.

**Follow for more security content:**
- Me: [x.com/0xzak](https://x.com/0xzak) | [crap.dev](https://crap.dev)
- My company: [Number Group](https://numbergroup.xyz) | [x.com/numbergroupxyz](https://x.com/numbergroupxyz)

Stay safe!

Contributor guide

Open the contributing guide

Research direction

Start by checking the exposed .env file and the repository’s .gitignore, then review the Groq dashboard and usage history as described in the report. Done means the exposed credential is revoked and replaced, .env is ignored, and no active secret remains in the repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.