A multi-language static code security analyzer for Python, HTML, and JavaScript.
CodeGuard AI is a developer-focused security analysis platform that detects common vulnerable coding patterns, evaluates security risk, maps findings to CWE and OWASP Top 10, provides remediation guidance, and generates professional security reports.
It also includes a Fix & Rescan workflow that lets developers measure security improvements after fixing vulnerabilities.
CodeGuard AI currently supports:
- π Python
- π HTML
- β‘ JavaScript
Each language has dedicated security detection rules.
Every scan generates:
- Security Score β 0β100
- Security Grade β AβF
- Risk Level
- Critical / High / Medium / Low findings
- Total vulnerabilities
- Detection confidence
Security findings are mapped to recognized security standards including:
- CWE identifiers
- OWASP Top 10 categories
- Severity classification
- Detection confidence
Example:
Unsafe eval() usage
Severity: CRITICAL
CWE: CWE-95
OWASP: A03:2021 β Injection
Confidence: 99%
Every detected issue provides:
- Vulnerability title
- Severity
- Line number
- CWE classification
- OWASP category
- Detection confidence
- Evidence
- Explanation
- Remediation recommendation
This allows developers to understand not only what is wrong, but also why it matters and how to improve it.
CodeGuard AI includes an iterative security workflow:
Vulnerable Code
β
Analyze
β
Security Score
β
Fix Code
β
Rescan
β
Before vs After
The application compares:
- Security score
- Security grade
- Issues remaining
- Issues resolved
Example:
Before
Security Score: 0/100
Issues: 7
Grade: F
β Fix & Rescan
After
Security Score: 100/100
Issues: 0
Grade: A
Generate a downloadable PDF security report containing:
- Security score
- Security grade
- Risk level
- Severity breakdown
- Security intelligence
- CWE mappings
- OWASP mappings
- Confidence scores
- Affected lines
- Evidence
- Recommendations
CodeGuard AI
β
ββββββββββββΌβββββββββββ
β β β
Python HTML JavaScript
Analyzer Analyzer Analyzer
β β β
ββββββββββββΌβββββββββββ
β
Finding Engine
β
ββββββββββββββββΌβββββββββββββββ
β β β
CWE OWASP Confidence
β β β
ββββββββββββββββΌβββββββββββββββ
β
Security Scoring
β
ββββββββββββ΄βββββββββββ
β β
Result Dashboard PDF Report
β
Fix & Rescan
β
Before / After
- Python
- Streamlit
- AST-based Python analysis
- Regex-based security pattern analysis
- ReportLab
- CWE
- OWASP Top 10
- Git / GitHub
git clone https://github.com/palashgoyalatwork/CodeGuardAI
cd CodeGuardAIpip install -r requirements.txtstreamlit run app.pyThe application will open in your browser.
CodeGuard AI can identify patterns such as:
eval(user_input)os.system(user_input)subprocess.run(command, shell=True)query = "SELECT * FROM users WHERE name = '" + username + "'"eval(userInput);document.write(userInput);element.innerHTML = userInput;<a href="javascript:alert('XSS')"><script>
// inline JavaScript
</script>CodeGuard AI follows a simple principle:
Detect β Explain β Fix β Rescan
The goal is not simply to tell developers that their code is vulnerable, but to help them understand the issue, apply a fix, and verify whether the security posture improved.
CodeGuard AI performs automated static pattern-based analysis.
It is not a replacement for a professional penetration test, comprehensive security audit, or manual code review.
Detected findings should be manually reviewed before making production security decisions.
Palash Goyal
Built as a cybersecurity-focused developer portfolio project exploring:
- Static code analysis
- Application security
- Secure coding practices
- CWE / OWASP classification
- Developer security tooling
Current Version: v1.0
- Python security analysis
- HTML security analysis
- JavaScript security analysis
- Security scoring
- Security grading
- CWE mapping
- OWASP mapping
- Confidence scoring
- Evidence extraction
- Remediation guidance
- PDF security reports
- Fix & Rescan
- Before / After comparison
- Full project / ZIP scanning
- Additional language support
- Expanded vulnerability rule library
- CI/CD integration
- AI-assisted remediation explanations
β If you find CodeGuard AI interesting, consider starring the repository.


