refactor: move all remaining files to orig/ directory
Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
7
orig/tools/security-audit/go.mod
Normal file
7
orig/tools/security-audit/go.mod
Normal file
@@ -0,0 +1,7 @@
|
||||
module github.com/fraktal/mev-beta/tools/security-audit
|
||||
|
||||
go 1.24
|
||||
|
||||
replace github.com/fraktal/mev-beta => ../../
|
||||
|
||||
require github.com/fraktal/mev-beta v0.0.0-00010101000000-000000000000
|
||||
1897
orig/tools/security-audit/internal/security_auditor.go
Normal file
1897
orig/tools/security-audit/internal/security_auditor.go
Normal file
File diff suppressed because it is too large
Load Diff
67
orig/tools/security-audit/main.go
Normal file
67
orig/tools/security-audit/main.go
Normal file
@@ -0,0 +1,67 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/fraktal/mev-beta/tools/security-audit/internal"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var (
|
||||
scanType = flag.String("scan", "all", "Scan type: code, dependencies, secrets, permissions, network, all")
|
||||
outputDir = flag.String("output", "reports/security", "Output directory")
|
||||
verbose = flag.Bool("verbose", false, "Enable verbose output")
|
||||
deepScan = flag.Bool("deep", false, "Perform deep security analysis")
|
||||
includeTests = flag.Bool("include-tests", false, "Include test files in security scan")
|
||||
riskThreshold = flag.String("risk-threshold", "medium", "Risk threshold: low, medium, high, critical")
|
||||
reportFormat = flag.String("format", "json", "Report format: json, sarif, txt")
|
||||
timeout = flag.Duration("timeout", 10*time.Minute, "Timeout for security operations")
|
||||
baseline = flag.String("baseline", "", "Baseline security report for comparison")
|
||||
remediationMode = flag.Bool("remediation", false, "Include remediation suggestions")
|
||||
complianceCheck = flag.Bool("compliance", false, "Include compliance checks")
|
||||
)
|
||||
flag.Parse()
|
||||
|
||||
// Create output directory
|
||||
if err := os.MkdirAll(*outputDir, 0755); err != nil {
|
||||
log.Fatalf("Failed to create output directory: %v", err)
|
||||
}
|
||||
|
||||
// Initialize security auditor
|
||||
auditor, err := internal.NewSecurityAuditor(&internal.SecurityAuditConfig{
|
||||
ScanType: *scanType,
|
||||
OutputDir: *outputDir,
|
||||
Verbose: *verbose,
|
||||
DeepScan: *deepScan,
|
||||
IncludeTests: *includeTests,
|
||||
RiskThreshold: *riskThreshold,
|
||||
ReportFormat: *reportFormat,
|
||||
Timeout: *timeout,
|
||||
Baseline: *baseline,
|
||||
RemediationMode: *remediationMode,
|
||||
ComplianceCheck: *complianceCheck,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to initialize security auditor: %v", err)
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
ctx, cancel := context.WithTimeout(ctx, *timeout)
|
||||
defer cancel()
|
||||
|
||||
fmt.Printf("Starting security audit: %s scan...\n", *scanType)
|
||||
if err := auditor.RunSecurityAudit(ctx); err != nil {
|
||||
log.Fatalf("Security audit failed: %v", err)
|
||||
}
|
||||
|
||||
if err := auditor.GenerateReport(); err != nil {
|
||||
log.Fatalf("Report generation failed: %v", err)
|
||||
}
|
||||
|
||||
fmt.Printf("Security audit complete. Reports saved to: %s\n", *outputDir)
|
||||
}
|
||||
Reference in New Issue
Block a user