T09 · Insecure Skill Coding Practices
- Location
fix_setup.sh:15- Finding
Setup Script Destructively Overwrites Existing Parser Implementations
- Content
View full analysis
scripts/parser/react_parser.py << 'EOF' from .base import BaseCodeParser, ParsedComponent, ParsedAPI, ParsedRule from typing import List, Dict, Any class ReactParser(BaseCodeParser): """React component parser (placeholder implementation)""" def parse(self) -> Dict[str, Any]: return { "file_info": { "path": self.file_path, "type": "react", "note": "React parser is not fully implemented" }, "components": [], "apis": [], "business_rules": [], "complexity": self.calculate_complexity() } def extract_components(self) -> List[ParsedComponent]: return [] def extract_apis(self) -> List[ParsedAPI]: return [] def extract_business_rules(self) -> List[ParsedRule]: return [] EOF # 3. Create Angular parser placeholder echo "Creating Angular parser placeholder..." cat > scripts/parser/angular_parser.py << 'EOF' from .base import BaseCodeParser, ParsedComponent, ParsedAPI, ParsedRule from typing import List, Dict, Any class AngularParser(BaseCodeParser): """Angular component parser (placeholder implementation)""" def parse(self) -> Dict[str, Any]: return { "file_info": { "path": self.file_path, "type": "angular", "note": "Angular parser is not fully implemented" }, "components": [], "apis": [], "business_rules": [], "complexity": self.calculate_complexity() } def extract_components(self) -> List[ParsedComponent]: return [] ...[truncated 2095 chars]- Remediation
View remediation
