Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Security review checklist for construction software systems. Use when building integrations, APIs, data pipelines, or dashboards for construction projects.
.claude/skills/datadrivenconstruction-security-review-construction/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 101% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 67% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 436% | 0% |
| case-22 | ✓→✗ | ▼ Worse | 75% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 101% | 0% |
This skill ensures all construction software systems follow security best practices, protecting sensitive project data, financial information, and business intelligence.
python# CRITICAL: Construction financial data security # ❌ NEVER Do This project_budget = 15000000 # Hardcoded in source margin_percentage = 0.18 # Business-sensitive info in code # ✅ ALWAYS Do This import os from cryptography.fernet import Fernet # Load from secure configuration project_config = load_secure_config(os.environ['PROJECT_CONFIG_PATH']) # Encrypt sensitive data at rest def encrypt_financial_data(data: dict) -> bytes: key = os.environ.get('ENCRYPTION_KEY') f = Fernet(key) return f.encrypt(json.dumps(data).encode())
python# BIM data often contains proprietary design information # ❌ NEVER store BIM directly in public cloud without encryption s3.upload_file('model.ifc', bucket='public-bucket') # ✅ ALWAYS encrypt and control access def upload_bim_secure(file_path: str, project_id: str): # Encrypt file encrypted_path = encrypt_file(file_path) # Generate pre-signed URL with expiration presigned_url = s3.generate_presigned_url( 'get_object', Params={ 'Bucket': 'secure-bim-bucket', 'Key': f'{project_id}/{os.path.basename(file_path)}' }, ExpiresIn=3600 # 1 hour expiration ) # Log access audit_log.info(f"BIM access granted: {project_id}") return presigned_url
python# Subcontractor data includes business-sensitive information class SubcontractorDataHandler: """Secure handling of subcontractor data""" # Fields that require encryption SENSITIVE_FIELDS = [ 'insurance_policy_number', 'bank_account', 'tax_id', 'bonding_capacity', 'historical_pricing' ] def store_subcontractor(self, data: dict) -> str: # Encrypt sensitive fields for field in self.SENSITIVE_FIELDS: if field in data: data[field] = self.encrypt(data[field]) # Store with audit trail sub_id = self.db.insert(data) self.audit.log(f"Subcontractor created: {sub_id}") return sub_id def get_subcontractor(self, sub_id: str, requester_id: str) -> dict: # Check authorization if not self.can_access(requester_id, sub_id): raise PermissionError("Unauthorized access to subcontractor data") # Log access self.audit.log(f"Subcontractor accessed: {sub_id} by {requester_id}") # Return with decrypted sensitive fields (only to authorized users) return self.decrypt_sensitive_fields(self.db.get(sub_id))
python# Mobile/field data collection must be secure from datetime import datetime, timedelta import hashlib class FieldDataCollector: """Secure field data collection""" def validate_photo_submission(self, photo_data: dict) -> bool: # Verify GPS timestamp is recent (within 24 hours) photo_time = datetime.fromisoformat(photo_data['timestamp']) if datetime.now() - photo_time > timedelta(hours=24): raise ValueError("Photo timestamp too old - possible replay attack") # Verify file hash matches file_hash = hashlib.sha256(photo_data['content']).hexdigest() if file_hash != photo_data['declared_hash']: raise ValueError("File integrity check failed") # Validate GPS coordinates are within project boundary if not self.is_within_project_bounds( photo_data['lat'], photo_data['lon'], photo_data['project_id'] ): self.audit.warn(f"Photo from outside project bounds: {photo_data}") return True def submit_daily_report(self, report: dict, user_id: str) -> str: # Verify user is assigned to project if not self.is_assigned_to_project(user_id, report['project_id']): raise PermissionError("User not assigned to this project") # Sign report with user credentials report['signature'] = self.sign_report(report, user_id) report['submitted_at'] = datetime.now().isoformat() return self.db.insert(report)
python# CWICR contains proprietary cost data class CWICRAccessControl: """Access control for CWICR database""" TIERS = { 'basic': ['public_rates', 'standard_descriptions'], 'professional': ['regional_rates', 'productivity_factors'], 'enterprise': ['custom_rates', 'historical_data', 'analytics'] } def search(self, query: str, user_id: str) -> list: # Get user tier tier = self.get_user_tier(user_id) # Limit results based on tier allowed_fields = self.TIERS[tier] # Execute search with field restrictions results = self.vector_search( query=query, fields=allowed_fields, limit=self.get_tier_limit(tier) ) # Log search for analytics self.audit.log(f"CWICR search: {user_id}, query='{query[:50]}...'") return results def export_data(self, user_id: str, format: str) -> bytes: # Enterprise only if self.get_user_tier(user_id) != 'enterprise': raise PermissionError("Export requires enterprise tier") # Watermark exported data data = self.get_exportable_data(user_id) watermarked = self.add_watermark(data, user_id) return watermarked
python# Secure OAuth integration with construction platforms class ConstructionPlatformIntegration: """Secure integration with external platforms""" def __init__(self, platform: str): self.platform = platform # Load credentials from secure vault self.credentials = self.vault.get(f'{platform}_oauth') def authenticate(self) -> str: # Use OAuth 2.0 with PKCE code_verifier = secrets.token_urlsafe(32) code_challenge = base64.urlsafe_b64encode( hashlib.sha256(code_verifier.encode()).digest() ).decode().rstrip('=') # Never store tokens in code or logs token = self.oauth_flow(code_verifier, code_challenge) # Store token securely self.secure_token_store.set( key=f'{self.platform}_token', value=token, ttl=token['expires_in'] ) return token def sync_data(self, project_id: str) -> dict: # Validate project access before sync if not self.has_project_access(project_id): raise PermissionError(f"No access to project {project_id}") # Rate limit syncs self.rate_limiter.check(f'sync_{self.platform}') # Sync with retry and error handling try: data = self.api_client.get_project_data(project_id) self.validate_incoming_data(data) return data except APIError as e: # Log error without sensitive details self.logger.error(f"Sync failed for {project_id}: {type(e).__name__}") raise
python# Construction documents often contain confidential information class SecureDocumentManager: """Secure document handling for construction""" # Document classification levels CLASSIFICATIONS = { 'public': [], 'internal': ['daily_reports', 'schedules'], 'confidential': ['contracts', 'bids', 'financials'], 'restricted': ['legal', 'hr', 'insurance'] } def upload_document(self, file: bytes, metadata: dict, user_id: str) -> str: # Scan for malware if not self.malware_scan(file): raise SecurityError("Malware detected in uploaded file") # Classify document classification = self.classify_document(metadata) # Check user can upload to this classification if not self.can_upload(user_id, classification): raise PermissionError(f"Cannot upload {classification} documents") # Encrypt based on classification if classification in ['confidential', 'restricted']: file = self.encrypt(file) # Store with audit trail doc_id = self.storage.put(file, metadata) self.audit.log(f"Document uploaded: {doc_id} by {user_id}") return doc_id def download_document(self, doc_id: str, user_id: str) -> bytes: # Check access doc = self.storage.get_metadata(doc_id) if not self.can_access(user_id, doc['classification']): raise PermissionError("Access denied") # Log download self.audit.log(f"Document downloaded: {doc_id} by {user_id}") # Return decrypted content return self.decrypt(self.storage.get(doc_id))
Remember: Construction data includes financial, legal, and competitive information. A breach can result in lost bids, legal liability, and reputational damage. Security is not optional.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | fail→pass | 18,003 | 15,685 | -13% | 1 | 1 | 0% | 2,900 | 5,822 | +101% | 0 | 0 | — |
case-01 | fail→fail | 25,130 | 40,428 | +61% | 1 | 1 | 0% | 4,629 | 6,218 | +34% | 0 | 0 | — |
case-02 | fail→fail | 20,496 | 25,175 | +23% | 1 | 1 | 0% | 3,012 | 6,748 | +124% | 0 | 0 | — |
case-03 | fail→pass | 20,347 | 16,749 | -18% | 1 | 1 | 0% | 3,767 | 6,288 | +67% | 0 | 0 | — |
case-05 | pass→pass | 17,214 | 14,051 | -18% | 1 | 1 | 0% | 2,811 | 5,639 | +101% | 0 | 0 | — |
case-06 | pass→pass | 15,722 | 17,365 | +10% | 1 | 1 | 0% | 2,632 | 6,338 | +141% | 0 | 0 | — |
case-07 | pass→pass | 16,513 | 11,332 | -31% | 1 | 1 | 0% | 2,960 | 5,330 | +80% | 0 | 0 | — |
case-08 | pass→pass | 11,314 | 10,786 | -5% | 1 | 1 | 0% | 1,755 | 5,060 | +188% | 0 | 0 | — |
case-09 | fail→pass | 36,127 | 20,879 | -42% | 1 | 1 | 0% | 1,313 | 7,035 | +436% | 0 | 0 | — |
case-10 | pass→pass | 18,211 | 21,670 | +19% | 1 | 1 | 0% | 3,034 | 7,092 | +134% | 0 | 0 | — |
case-11 | fail→fail | 18,659 | 22,268 | +19% | 1 | 1 | 0% | 3,056 | 7,262 | +138% | 0 | 0 | — |
case-12 | pass→pass | 18,447 | 18,500 | +0% | 1 | 1 | 0% | 3,091 | 6,669 | +116% | 0 | 0 | — |
case-13 | pass→pass | 18,092 | 14,921 | -18% | 1 | 1 | 0% | 2,948 | 5,741 | +95% | 0 | 0 | — |
case-14 | pass→pass | 18,106 | 19,255 | +6% | 1 | 1 | 0% | 2,946 | 6,344 | +115% | 0 | 0 | — |
case-15 | pass→pass | 17,473 | 13,253 | -24% | 1 | 1 | 0% | 2,888 | 5,593 | +94% | 0 | 0 | — |
case-16 | fail→fail | 17,949 | 19,260 | +7% | 1 | 1 | 0% | 2,965 | 6,805 | +130% | 0 | 0 | — |
case-17 | pass→pass | 16,104 | 18,128 | +13% | 1 | 1 | 0% | 2,582 | 6,570 | +154% | 0 | 0 | — |
case-18 | pass→pass | 22,292 | 19,154 | -14% | 1 | 1 | 0% | 3,706 | 6,768 | +83% | 0 | 0 | — |
case-19 | pass→pass | 18,952 | 16,877 | -11% | 1 | 1 | 0% | 2,800 | 5,934 | +112% | 0 | 0 | — |
case-20 | pass→pass | 21,201 | 14,961 | -29% | 1 | 1 | 0% | 4,207 | 6,136 | +46% | 0 | 0 | — |
case-21 | pass→pass | 18,400 | 20,189 | +10% | 1 | 1 | 0% | 3,163 | 6,674 | +111% | 0 | 0 | — |
case-22 | pass→fail | 21,231 | 21,167 | -0% | 1 | 1 | 0% | 4,191 | 7,330 | +75% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +9 percentage points is the difference between those two pass rates over the 21 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.