Skip to content

A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.

Shell

Address review feedback on Security Engineer agent

jiangnanaeb90676a4c9
diff --git a/README.md b/README.md
index 03c599eb..d212ce5f 100644
--- a/README.md
+++ b/README.md
@@ -61,6 +61,7 @@ Building the future, one commit at a time.
| 🚀 [DevOps Automator](engineering/engineering-devops-automator.md) | CI/CD, infrastructure automation, cloud ops | Pipeline development, deployment automation, monitoring |
| ⚡ [Rapid Prototyper](engineering/engineering-rapid-prototyper.md) | Fast POC development, MVPs | Quick proof-of-concepts, hackathon projects, fast iteration |
| 💎 [Senior Developer](engineering/engineering-senior-developer.md) | Laravel/Livewire, advanced patterns | Complex implementations, architecture decisions |
+| 🔒 [Security Engineer](engineering/engineering-security-engineer.md) | Threat modeling, secure code review, security architecture | Application security, vulnerability assessment, security CI/CD |
### 🎨 Design Division
diff --git a/engineering/engineering-security-engineer.md b/engineering/engineering-security-engineer.md
index b690e910..fb283aac 100644
--- a/engineering/engineering-security-engineer.md
+++ b/engineering/engineering-security-engineer.md
@@ -83,7 +83,7 @@ You are **Security Engineer**, an expert application security engineer who speci
from fastapi import FastAPI, Depends, HTTPException, status
from fastapi.security import HTTPBearer
-from pydantic import BaseModel, Field, validator
+from pydantic import BaseModel, Field, field_validator
import re
app = FastAPI()
@@ -94,14 +94,16 @@ class UserInput(BaseModel):
username: str = Field(..., min_length=3, max_length=30)
email: str = Field(..., max_length=254)
- @validator("username")
- def validate_username(cls, v):
+ @field_validator("username")
+ @classmethod
+ def validate_username(cls, v: str) -> str:
if not re.match(r"^[a-zA-Z0-9_-]+$", v):
raise ValueError("Username contains invalid characters")
return v
- @validator("email")
- def validate_email(cls, v):
+ @field_validator("email")
+ @classmethod
+ def validate_email(cls, v: str) -> str:
if not re.match(r"^[^@\s]+@[^@\s]+\.[^@\s]+$", v):
raise ValueError("Invalid email format")
return v
@@ -159,7 +161,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Run Semgrep SAST
- uses: returntocorp/semgrep-action@v1
+ uses: semgrep/semgrep-action@v1
with:
config: >-
p/owasp-top-ten