
coldfusion-validator
by ErnestPenaJr
SKILL.md
name: coldfusion-validator description: Comprehensive ColdFusion (CFML) syntax validation and best practices verification. Use when validating ColdFusion code, checking for security vulnerabilities (SQL injection, proper cfqueryparam usage), ensuring proper variable scoping, verifying code quality standards, or reviewing ColdFusion applications for senior developer best practices.
ColdFusion Syntax Validation Skill
Overview
This skill provides comprehensive ColdFusion (CFML) syntax validation and best practices verification based on senior developer standards. It helps ensure code quality, security, and maintainability.
Tools and Validation Methods
1. CFLint - Primary Validation Tool
CFLint is the standard tool for ColdFusion syntax validation and best practices checking.
Installation: ```bash
Install via npm
npm install -g cflint
Or download standalone JAR from GitHub
wget https://github.com/cflint/CFLint/releases/latest/download/cflint-assembly-1.5.0.jar ```
Basic Usage: ```bash
Validate a single file
cflint -file path/to/file.cfm
Validate entire directory
cflint -folder /path/to/project -html -htmlfile report.html
JSON output for programmatic parsing
cflint -folder /path/to/project -json -jsonfile report.json ```
2. Configuration File (.cflintrc)
Create a `.cflintrc` configuration file for project-specific rules including checks for SQL injection, missing cfqueryparam, nested cfoutput, and proper documentation.
Senior Developer Standards
Critical Security Rules
1. SQL Injection Prevention
Always use `cfqueryparam` for dynamic SQL:
❌ Bad: ```cfml SELECT * FROM users WHERE username = '#form.username#' ```
✅ Good: ```cfml SELECT id, username, email, created_date FROM users WHERE username = ```
2. Variable Scoping
Always scope variables properly:
❌ Bad: ```cfml userID = arguments.id ```
✅ Good: ```cfml ```
Code Quality Standards
3. Component Documentation
Always provide hints for components, functions, and arguments:
✅ Good: ```cfml ```
4. Use CFScript for Logic
Modern ColdFusion prefers script syntax for business logic with proper error handling.
Validation Process
When validating ColdFusion code:
- Install CFLint if not already available
- Run validation using cflint command
- Parse results and highlight critical security issues
- Check for:
- SQL injection vulnerabilities
- Missing cfqueryparam
- SELECT * usage
- Variable scoping issues
- Missing documentation
- Nested cfoutput tags
- Provide specific fixes with before/after examples
- Explain reasoning behind each best practice
Manual Review Checklist
-
Security
- All SQL queries use cfqueryparam
- No direct form/URL variable usage in queries
- Sensitive data is encrypted
- File upload paths are validated
-
Performance
- Queries specify columns (no SELECT *)
- Appropriate query caching
- Indexes exist for queried columns
-
Code Quality
- Variables properly scoped (var/local)
- Functions have hints/documentation
- No nested cfoutput tags
- Proper error handling (try/catch)
-
Maintainability
- Consistent naming conventions
- DRY principle followed
- Separation of concerns (MVC/layered)
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です