Command Line Tools
Security Commands
Security Commands
Section titled “Security Commands”Wheels provides comprehensive security tools to help identify vulnerabilities, enforce security best practices, and maintain a secure application throughout development and deployment.
Available Commands
Section titled “Available Commands”Core Security Commands
Section titled “Core Security Commands”wheels security scan- Scan for security vulnerabilities
Overview
Section titled “Overview”Security is a critical aspect of web application development. The Wheels security commands help you:
- Identify Vulnerabilities: Automated scanning for common security issues
- Enforce Best Practices: Check compliance with security standards
- Fix Issues Automatically: Auto-repair common security misconfigurations
- Generate Reports: Create detailed security reports for teams and compliance
- Integrate with CI/CD: Automated security testing in your build pipeline
Quick Start
Section titled “Quick Start”Basic Security Assessment
Section titled “Basic Security Assessment”# Scan your entire applicationwheels security scan
# Focus on critical issues onlywheels security scan --severity=critical
# Generate detailed HTML reportwheels security scan --report=html --output=security-report.htmlSecurity Checks
Section titled “Security Checks”Vulnerability Categories
Section titled “Vulnerability Categories”Critical Issues
Section titled “Critical Issues”- SQL Injection - Database query vulnerabilities
- Authentication Bypass - Missing or weak authentication
- Code Injection - Unsafe code execution vulnerabilities
- Hardcoded Credentials - Passwords, keys, or secrets in code
High Priority Issues
Section titled “High Priority Issues”- Cross-Site Request Forgery (CSRF) - Missing request validation
- Cross-Site Scripting (XSS) - Unescaped user input
- Information Disclosure - Sensitive data exposure
- Insecure Direct Object References - Missing authorization
Medium Priority Issues
Section titled “Medium Priority Issues”- Security Misconfiguration - Unsafe application settings
- Weak Session Management - Session security issues
- Missing Security Headers - HTTP security headers
- Input Validation Issues - Insufficient input checking
Low Priority Issues
Section titled “Low Priority Issues”- Code Quality Issues - Security-related code smells
- Documentation Gaps - Missing security documentation
- Deprecated Functions - Use of outdated security methods
Framework-Specific Security
Section titled “Framework-Specific Security”Wheels Security Features
Section titled “Wheels Security Features”The security commands understand and check for proper usage of Wheels security features:
CSRF Protection
Section titled “CSRF Protection”// Checked: CSRF protection enabledcomponent extends="Controller" { function config() { protectsFromForgery(); }}
// Flagged: Missing CSRF protectioncomponent extends="Controller" { function create() { // State-changing action without protection }}Model Security
Section titled “Model Security”// Checked: Proper parameter usageusers = model("User").findAll(where="name = :name", name=params.name);
// Flagged: SQL injection riskusers = model("User").findAll(where="name = '#params.name#'");Configuration Security
Section titled “Configuration Security”// Checked: Production-safe settingsset(showErrorInformation=false);set(sendEmailOnError=true);
// Flagged: Debug mode in productionset(showErrorInformation=true);Integration Workflows
Section titled “Integration Workflows”Development Workflow
Section titled “Development Workflow”# Pre-commit security checkwheels security scan --severity=high --fix
# If issues found, review and fix manuallygit add -Agit commit -m "Security fixes applied"CI/CD Integration
Section titled “CI/CD Integration”# In your build pipelinewheels security scan --report=json --output=security-results.json --severity=medium
# Fail build on security issuesif [ -s security-results.json ]; then echo "Security issues found - failing build" exit 1fiTeam Reporting
Section titled “Team Reporting”# Weekly security reportwheels security scan --report=html --output="security-report-$(date +%Y%m%d).html"
# Share with teamecho "Weekly security scan complete. Report: security-report-$(date +%Y%m%d).html"Best Practices
Section titled “Best Practices”Regular Security Scanning
Section titled “Regular Security Scanning”- Daily Development: Quick scans during active development
- Pre-commit: Automated scans before code commits
- CI/CD Pipeline: Comprehensive scans in automated builds
- Weekly Reviews: Detailed security reports for team review
- Release Validation: Security verification before deployments
Security Configuration
Section titled “Security Configuration”- Environment-Specific: Different security rules for dev/prod
- Custom Rules: Tailored security checks for your application
- Exclusion Patterns: Skip vendor code and test files
- Severity Tuning: Adjust sensitivity based on project needs
Team Practices
Section titled “Team Practices”- Security Training: Educate team on common vulnerabilities
- Code Reviews: Include security review in code review process
- Documentation: Maintain security guidelines and procedures
- Incident Response: Plan for addressing security issues
Security Standards
Section titled “Security Standards”Compliance Coverage
Section titled “Compliance Coverage”The security commands help ensure compliance with:
- OWASP Top 10 - Web application security risks
- CWE Top 25 - Most dangerous software errors
- NIST Cybersecurity Framework - Security best practices
- PCI DSS - Payment card security requirements (relevant checks)
- GDPR - Data protection requirements (data handling checks)
Security Frameworks
Section titled “Security Frameworks”- Defense in Depth - Multiple layers of security controls
- Secure by Design - Security built into development process
- Zero Trust - Never trust, always verify approach
- Risk-Based Security - Focus on highest-impact vulnerabilities
Reporting and Analytics
Section titled “Reporting and Analytics”Report Types
Section titled “Report Types”- Console Output - Quick feedback during development
- JSON Reports - Machine-readable for automation
- HTML Reports - Detailed reports for human review
- Executive Summary - High-level security overview
Metrics Tracking
Section titled “Metrics Tracking”- Vulnerability Trends - Track security improvement over time
- Fix Rates - Monitor how quickly issues are resolved
- New Issue Detection - Identify newly introduced vulnerabilities
- Compliance Scores - Measure adherence to security standards
Advanced Features
Section titled “Advanced Features”Custom Security Rules
Section titled “Custom Security Rules”Create application-specific security checks:
customSecurityRules = { // Check for specific business logic vulnerabilities "adminPanelAccess": { pattern: "admin.*\.cfc", check: "authentication", severity: "critical" },
// Check for data privacy compliance "personalDataHandling": { pattern: ".*user.*\.cfc", check: "dataProtection", severity: "high" }};Integration APIs
Section titled “Integration APIs”Programmatic access to security scanning:
// In your applicationsecurityService = new SecurityService();results = securityService.scan( path = "/app", severity = "medium", outputFormat = "json");
// Process resultsfor (issue in results.issues) { if (issue.severity == "critical") { // Alert security team sendSecurityAlert(issue); }}Performance Considerations
Section titled “Performance Considerations”Scan Optimization
Section titled “Scan Optimization”- Incremental Scanning - Only scan changed files
- Parallel Processing - Faster scanning of large codebases
- Caching Results - Skip unchanged files in subsequent scans
- Selective Scanning - Focus on high-risk areas first
Resource Usage
Section titled “Resource Usage”- Memory Efficient - Handles large projects without memory issues
- CPU Optimization - Efficient pattern matching and analysis
- Disk I/O - Minimized file system operations
- Network Resources - Efficient vulnerability database updates
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”- False Positives - Configure exclusions or custom rules
- Performance Issues - Use selective scanning or increase resources
- Integration Problems - Check CI/CD configuration and permissions
- Report Generation - Verify output paths and file permissions
Getting Help
Section titled “Getting Help”- Verbose Output - Use detailed logging for debugging
- Documentation - Comprehensive guides and examples
- Community Support - Active community forums and resources
- Professional Support - Enterprise support options available