| name | security-review-construction |
| description | Security review checklist for construction software systems. Use when building integrations, APIs, data pipelines, or dashboards for construction projects. |
| homepage | https://datadrivenconstruction.io |
| metadata | {"openclaw":{"emoji":"🛡️","os":["darwin","linux","win32"],"homepage":"https://datadrivenconstruction.io","requires":{"bins":"[Truncated]"}}} |
Security Review Skill for Construction Systems
This skill ensures all construction software systems follow security best practices, protecting sensitive project data, financial information, and business intelligence.
When to Activate
- Building ERP/BIM system integrations
- Creating construction dashboards
- Handling cost/financial data
- Building document management systems
- Creating APIs for field data collection
- Integrating with external platforms (Procore, PlanGrid, etc.)
- Working with subcontractor/vendor data
- Processing payment applications
Construction-Specific Security Concerns
1. Financial Data Protection
project_budget = 15000000
margin_percentage = 0.18
import os
from cryptography.fernet import Fernet
project_config = load_secure_config(os.environ['PROJECT_CONFIG_PATH'])
def encrypt_financial_data(data: dict) -> bytes:
key = os.environ.get('ENCRYPTION_KEY')
f = Fernet(key)
return f.encrypt(json.dumps(data).encode())
Financial Data Checklist
2. BIM/CAD Data Security
s3.upload_file('model.ifc', bucket='public-bucket')
def upload_bim_secure(file_path: str, project_id: str):
encrypted_path = encrypt_file(file_path)
presigned_url = s3.generate_presigned_url(
'get_object',
Params={
'Bucket': 'secure-bim-bucket',
'Key': f'{project_id}/{os.path.basename(file_path)}'
},
ExpiresIn=3600
)
audit_log.info(f"BIM access granted: {project_id}")
return presigned_url
BIM/CAD Checklist
3. Subcontractor/Vendor Data
class SubcontractorDataHandler:
"""Secure handling of subcontractor data"""
SENSITIVE_FIELDS = [
'insurance_policy_number',
'bank_account',
'tax_id',
'bonding_capacity',
'historical_pricing'
]
def store_subcontractor(self, data: dict) -> str:
for field in self.SENSITIVE_FIELDS:
if field in data:
data[field] = self.encrypt(data[field])
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:
if not self.can_access(requester_id, sub_id):
raise PermissionError("Unauthorized access to subcontractor data")
self.audit.log(f"Subcontractor accessed: by ")
.decrypt_sensitive_fields(.db.get(sub_id))
Vendor Data Checklist
4. Field Data Collection Security
from datetime import datetime, timedelta
import hashlib
class FieldDataCollector:
"""Secure field data collection"""
def validate_photo_submission(self, photo_data: dict) -> bool:
photo_time = datetime.fromisoformat(photo_data['timestamp'])
if datetime.now() - photo_time > timedelta(hours=24):
raise ValueError("Photo timestamp too old - possible replay attack")
file_hash = hashlib.sha256(photo_data['content']).hexdigest()
if file_hash != photo_data['declared_hash']:
raise ValueError("File integrity check failed")
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:
.is_assigned_to_project(user_id, report[]):
PermissionError()
report[] = .sign_report(report, user_id)
report[] = datetime.now().isoformat()
.db.insert(report)
Field Data Checklist
5. CWICR Database Security
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:
tier = self.get_user_tier(user_id)
allowed_fields = self.TIERS[tier]
results = self.vector_search(
query=query,
fields=allowed_fields,
limit=self.get_tier_limit(tier)
)
self.audit.log(f"CWICR search: {user_id}, query='{query[:50]}...'")
return results
def export_data(self, user_id: str, format: str) -> bytes:
if self.get_user_tier(user_id) != :
PermissionError()
data = .get_exportable_data(user_id)
watermarked = .add_watermark(data, user_id)
watermarked
CWICR Checklist
6. Integration Security (Procore, PlanGrid, etc.)
class ConstructionPlatformIntegration:
"""Secure integration with external platforms"""
def __init__(self, platform: str):
self.platform = platform
self.credentials = self.vault.get(f'{platform}_oauth')
def authenticate(self) -> str:
code_verifier = secrets.token_urlsafe(32)
code_challenge = base64.urlsafe_b64encode(
hashlib.sha256(code_verifier.encode()).digest()
).decode().rstrip('=')
token = self.oauth_flow(code_verifier, code_challenge)
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:
if not self.has_project_access(project_id):
raise PermissionError(f"No access to project ")
.rate_limiter.check()
:
data = .api_client.get_project_data(project_id)
.validate_incoming_data(data)
data
APIError e:
.logger.error()
Integration Checklist
7. Document Management Security
class SecureDocumentManager:
"""Secure document handling for construction"""
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:
if not self.malware_scan(file):
raise SecurityError("Malware detected in uploaded file")
classification = self.classify_document(metadata)
if not self.can_upload(user_id, classification):
raise PermissionError(f"Cannot upload {classification} documents")
if classification in ['confidential', 'restricted']:
file = .encrypt(file)
doc_id = .storage.put(file, metadata)
.audit.log()
doc_id
() -> :
doc = .storage.get_metadata(doc_id)
.can_access(user_id, doc[]):
PermissionError()
.audit.log()
.decrypt(.storage.get(doc_id))
Document Checklist
Pre-Deployment Security Checklist for Construction Systems
Data Protection
Authentication & Authorization
Audit & Compliance
Integration Security
Field Data Security
Resources
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.