About the Project
Inspiration
Security is one of the biggest bottlenecks in software development. Developers often commit code with hardcoded secrets, unsafe functions, or misconfigurations that can be exploited—sometimes before code even reaches production. Manual code reviews and security scans are slow, error-prone, and expensive.
I wanted to build something that doesn’t just alert developers—but acts on their behalf. The idea for SecureFlow AI came from the vision of giving every developer a digital teammate that automatically detects vulnerabilities, fixes them, and ensures compliance, all within GitLab workflows.
What I Learned
Building SecureFlow AI taught me:
- How to integrate AI agents into real CI/CD pipelines, including GitLab triggers and flows.
- How to prompt LLMs to generate secure, functional code fixes automatically.
- How to combine event-driven automation with security scanning to reduce human error.
- The importance of balancing scope vs. functionality—I focused on a single, high-impact prototype that clearly demonstrates the agent’s value.
I also learned the power of storytelling in demos: showing the pain first and then demonstrating the solution is what convinces judges of real impact.
How I Built It
The project is built as an autonomous agent workflow in GitLab:
- Trigger: When a new Merge Request (MR) is created, the agent activates.
- Scan: The code is scanned for common vulnerabilities like hardcoded API keys or unsafe functions using regex-based detection.
- Fix: If an issue is found, the code is sent to an AI model (OpenAI / Anthropic) which automatically generates a secure fix.
- Commit & MR: A new branch is created, the fixed code is committed, and a new MR is automatically opened.
- Summary: The agent posts a summary comment on the MR showing what was fixed and why, creating a fully automated security workflow.
This design ensures that the agent takes action rather than just suggesting fixes, meeting the hackathon’s key requirements.
Key Components:
- Security Scanner: Python scripts using regex to detect patterns like hardcoded secrets.
- Fix Generator: LLM prompts to rewrite insecure code using environment variables.
- GitLab API Integration: Create branches, commit changes, open MRs, post comments.
- Flow Orchestration: GitLab flow configuration connecting triggers to agents.
Challenges Faced
- Time constraints: Limited time to implement a fully working prototype.
- AI code fixing: LLM sometimes suggested incomplete fixes, requiring a verification step.
- GitLab integration: Handling branch creation, commits, and MR logic needed careful sequencing.
- Demo clarity: Making a 3-minute video visually convey “agent triggered → fixes → MR created” required precise staging.
Impact
SecureFlow AI shows how security and compliance can be automated without human intervention. Even this small prototype demonstrates:
- Reduction in developer time spent on security fixes.
- Prevention of hardcoded secrets entering production.
- Automatic creation of secure MRs ready for review.
This concept can scale to more complex vulnerabilities, test automation, and compliance workflows, turning SecureFlow AI into a full-fledged digital teammate.
Built With
- Languages: Python
- Platforms & APIs: GitLab API, GitLab CI/CD Flows
- AI Services: OpenAI GPT / Anthropic Claude
- Other Tools: Regex-based scanning, OS environment variable management
Built With
- anthropic
- api
- ci/cd
- gitlab
- openai
- python
Log in or sign up for Devpost to join the conversation.