A collection of static analysis tools for validating AI-generated code and detecting security vulnerabilities. These tools help ensure code quality, security, and best practices in AI-assisted development workflows.
This repository contains four specialized tools for code analysis and security scanning:
- flaw-detector - Detects import violations and unreachable code
- security - Finds SQL injection and hardcoded credentials
- challenge - Scans for leaked AWS and OpenAI API keys
- validation - Example code demonstrating TypeScript validation
- Deno 1.x or higher (installation guide)
- Make (standard on Linux/macOS, use WSL on Windows)
- Git for version control
# macOS/Linux
curl -fsSL https://deno.land/install.sh | sh
# Windows (PowerShell)
irm https://deno.land/install.ps1 | iex
# Verify installation
deno --versiongit clone https://github.com/paiml/responsible-ai-dev.git
cd responsible-ai-dev
# Verify setup
make help# Run all linting, type checks, and tests
make validate
# Run individual checks
make lint # Lint all projects
make check # Type check all projects
make test # Run all tests
make coverage # Generate coverage reportsEach tool is self-contained with its own README and Makefile:
# Run any tool
cd flaw-detector
make all # Run tests, linting, and coverage
make run # Scan current directory
# Same pattern for all tools
cd security && make all
cd challenge && make all# Run tests for a specific project
make challenge-test
make security-lint
make flaw-detector-coverage
# Build executable binaries
make buildThis section provides detailed usage instructions for each tool in the repository.
All tools support a common CLI pattern:
# General pattern
deno run --allow-read <tool>.ts <directory>
# Or use compiled binaries
make build
./<project>/<tool_name> <directory># Scan for SQL injection and hardcoded credentials
cd security
make run
# Scan for leaked API keys
cd challenge
make run
# Detect code flaws
cd flaw-detector
make run# Generate coverage for all projects
make coverage
# View HTML coverage report
deno coverage challenge/cov_profile --htmlresponsible-ai-dev/
βββ challenge/ # Secret scanner for API keys
β βββ secret_scanner.ts
β βββ secret_scanner_test.ts
β βββ Makefile
β βββ README.md
βββ flaw-detector/ # Code flaw detector
β βββ flaw_detector.ts
β βββ flaw_detector_test.ts
β βββ Makefile
β βββ README.md
βββ security/ # Security scanner
β βββ security_scanner.ts
β βββ security_scanner_test.ts
β βββ Makefile
β βββ README.md
βββ validation/ # Validation examples
β βββ validating_code.ts
β βββ Makefile
β βββ README.md
βββ .github/workflows/ # CI/CD pipelines
βββ Makefile # Root Makefile (orchestrates all projects)
βββ README.md # This file
# Run all tests
make test
# Run fast tests only (<5 min)
make test-fast
# Run project-specific tests
make challenge-test# Run all quality gates
make validate
# Individual checks
make lint # Deno lint + bashrs
make check # TypeScript type checking
make coverage # Coverage reports# Build all projects
make build
# Build specific project
make challenge-buildWe welcome contributions from everyone! This project follows a comprehensive contribution workflow to ensure quality and consistency.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/responsible-ai-dev.git cd responsible-ai-dev - Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and ensure all tests pass:
make validate # Runs lint, check, test, coverage - Commit your changes with a descriptive message:
git commit -m 'Add amazing feature: detailed description' - Push to your fork:
git push origin feature/amazing-feature
- Open a Pull Request on GitHub with a clear description
- β
All code must pass
make validate(lint, type-check, tests, coverage) - β Maintain or improve test coverage (target: 70%+ minimum)
- β Add comprehensive tests for new features
- β Update documentation as needed
- β
Follow existing code style (enforced by
deno fmt) - β Keep commits atomic and well-described
- β No breaking changes without discussion
- Write unit tests for all new functions
- Include integration tests for new features
- Test edge cases and error conditions
- Run
make testbefore committing - Ensure coverage doesn't decrease
- Update README.md for user-facing changes
- Add inline code comments for complex logic
- Update tool-specific READMEs in each directory
- Include usage examples for new features
- Ensure all CI checks pass (GitHub Actions will run automatically)
- Request review from maintainers
- Address review feedback promptly
- Squash commits if requested
- Keep PR focused on a single feature/fix
Found a bug or have a feature request?
- Check existing issues to avoid duplicates
- Create a new issue with:
- Clear, descriptive title
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Environment details (Deno version, OS)
- Code samples if applicable
# Install dependencies
make install
# Run tests
make test
# Run linting
make lint
# Generate coverage
make coverage
# Run all quality checks
make validate- Be respectful and inclusive
- Provide constructive feedback
- Focus on the code, not the person
- Help others learn and grow
- Follow the project's coding standards
- Issues: Report bugs via GitHub Issues
- Discussions: Ask questions in GitHub Discussions
This project follows strict quality standards:
- β Linting: Deno lint + bashrs for Makefiles
- β Type Safety: Full TypeScript type checking
- β Testing: Comprehensive test coverage (target: 70%+)
- β CI/CD: Automated testing on all PRs and commits
- β Security: Regular secret scanning and vulnerability checks
- Repository Score: Run
make repo-scoreto see current health metrics - Test Coverage: Run
make coverageto generate coverage reports - CI Status: All tests must pass before merging
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 PAIML
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- Built with Deno for secure TypeScript execution
- Quality enforcement powered by PMAT
- Makefile linting via bashrs
- Issues: Report bugs via GitHub Issues
- Discussions: Join conversations in GitHub Discussions
- Documentation: See individual tool READMEs for detailed usage
Made with β€οΈ by the PAIML Team