@tera-system/core 0.2.11 → 0.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  <#
2
2
  =============================================================================
3
- tera-tooling.ps1 - Tera 5-Tool Standard provisioning (SCP-2026-08-29-012)
3
+ tera-tooling.ps1 - Tera Toolchain provisioning (SCP-2026-08-29-012 + SCP-2026-09-02-001)
4
4
  =============================================================================
5
- Verifies (and optionally installs) the five approved Tera tools so every
5
+ Verifies (and optionally installs) the approved Tera tools so every
6
6
  repository has a guaranteed, consistent toolchain:
7
7
 
8
8
  Tool Kind Installer used
@@ -12,6 +12,14 @@
12
12
  Structurizr MCP (uv) uv (Astral) + Docker (validate/export)
13
13
  Gitleaks CLI winget install Gitleaks.Gitleaks
14
14
  Trivy CLI winget install AquaSecurity.Trivy
15
+ Nmap offensive winget install Insecure.Nmap
16
+ Wireshark offensive winget install WiresharkFoundation.Wireshark
17
+ k6 offensive winget install GrafanaLabs.k6
18
+ ffuf/Nuclei/dalfox offensive GitHub releases (Go binary)
19
+ sqlmap offensive pip install sqlmap
20
+ Burp/ZAP/Hydra/Metasploit/John offensive external installers (reported)
21
+
22
+ Cloud (DigitalOcean) tools are DEFERRED until first app deployment (SCP-2026-09-02-001).
15
23
 
16
24
  Usage:
17
25
  powershell -ExecutionPolicy Bypass -File .\tools\tera-tooling.ps1 # report only
@@ -105,6 +113,91 @@ if ($Install -and $pwMCP) {
105
113
  }
106
114
  Add-Row 'Playwright' 'MCP' $pwMCP 'npx @playwright/mcp (auto)'
107
115
 
116
+ # ---- Offensive Security Tools (SCP-2026-09-02-001 - Team Security) ----------
117
+ # Used only by Team Security agents within a written authorization scope.
118
+ # Verified via known install paths (winget installs may not be on PATH in a fresh shell).
119
+ $offensiveKnownPaths = @(
120
+ @{ Name = 'Nmap'; Test = "${env:ProgramFiles(x86)}\Nmap\nmap.exe"; Alt = 'nmap'; VersionArg = '--version'; Install = 'winget install --id Insecure.Nmap -e --silent --accept-package-agreements --accept-source-agreements' },
121
+ @{ Name = 'Wireshark'; Test = "$env:ProgramFiles\Wireshark\tshark.exe"; Alt = 'tshark'; VersionArg = '--version'; Install = 'winget install --id WiresharkFoundation.Wireshark -e --silent --accept-package-agreements --accept-source-agreements' },
122
+ @{ Name = 'k6'; Test = "$env:ProgramFiles\k6\k6.exe"; Alt = 'k6'; VersionArg = 'version'; Install = 'winget install --id GrafanaLabs.k6 -e --silent --accept-package-agreements --accept-source-agreements' }
123
+ )
124
+ foreach ($t in $offensiveKnownPaths) {
125
+ $ok = (Test-Path -LiteralPath $t.Test) -or (Test-Command $t.Alt $t.VersionArg)
126
+ if (-not $ok -and $Install) { $ok = Invoke-BestEffort "$($t.Name) install" { Invoke-Expression $t.Install | Out-Null } }
127
+ Add-Row $t.Name 'offensive' $ok $t.Install
128
+ }
129
+
130
+ # Go-based offensive tools (installed under %LOCALAPPDATA%\Tera-Tools)
131
+ $teraTools = "$env:LOCALAPPDATA\Tera-Tools"
132
+ $goToolPaths = @(
133
+ @{ Name = 'ffuf'; Path = "$teraTools\ffuf\ffuf.exe"; VersionArg = '-V' },
134
+ @{ Name = 'Nuclei'; Path = "$teraTools\nuclei\nuclei.exe"; VersionArg = '-version' },
135
+ @{ Name = 'dalfox'; Path = (Get-ChildItem "$teraTools\dalfox" -Recurse -Filter 'dalfox.exe' -ErrorAction SilentlyContinue | Select-Object -First 1).FullName; VersionArg = 'version' }
136
+ )
137
+ foreach ($t in $goToolPaths) {
138
+ $ok = ($t.Path -and (Test-Path -LiteralPath $t.Path))
139
+ if (-not $ok -and $Install) {
140
+ Write-Host " ! $($t.Name) requires manual download (Go binary for Windows) - see TOOLING_AND_MCP_POLICY.md §3.7"
141
+ $ok = $false
142
+ }
143
+ Add-Row $t.Name 'offensive' $ok "Tera-Tools download: $($t.Path)"
144
+ }
145
+
146
+ # Python-based offensive tools
147
+ # sqlmap official repo clone (pip package is broken on Windows - ModuleNotFoundError)
148
+ $sqlmapPy = "$env:LOCALAPPDATA\Tera-Tools\sqlmap\sqlmap.py"
149
+ $sqlmapOk = Test-Path -LiteralPath $sqlmapPy
150
+ if (-not $sqlmapOk -and $Install) {
151
+ Write-Host ' Installing sqlmap from official repo (git clone)...'
152
+ $sqlmapDir = "$env:LOCALAPPDATA\Tera-Tools\sqlmap"
153
+ New-Item -ItemType Directory -Path $sqlmapDir -Force | Out-Null
154
+ $sqlmapOk = Invoke-BestEffort 'sqlmap clone' { git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git $sqlmapDir }
155
+ }
156
+ Add-Row 'sqlmap' 'offensive' $sqlmapOk 'git clone sqlmapproject/sqlmap (run: python sqlmap.py)'
157
+
158
+ # Manual tools (checked but not auto-installable)
159
+ $burpOk = Test-Path -LiteralPath 'F:\burpsuite_profissional_2026.1.5\BurpSuite profissional v2026.1.5\burpsuite_pro_v2026.1.5.jar'
160
+ Add-Row 'Burp Suite Pro' 'offensive' $burpOk 'java -jar [path]/burpsuite_pro_v2026.1.5.jar (external)'
161
+
162
+ $zapOk = (Test-Path -LiteralPath "$env:ProgramFiles\ZAP\Zed Attack Proxy\zap.bat") -or (Test-Command 'zap' '--version')
163
+ if (-not $zapOk -and $Install) {
164
+ Write-Host ' ! OWASP ZAP requires manual download from https://www.zaproxy.org/download/'
165
+ $zapOk = $false
166
+ }
167
+ Add-Row 'OWASP ZAP' 'offensive' $zapOk 'winget install ZAP.ZAP / zaproxy.org'
168
+
169
+ $hydraOk = Test-Command 'hydra' '-h'
170
+ if (-not $hydraOk -and $Install) {
171
+ Write-Host ' ! THC-Hydra on Windows is not guaranteed; fallback: ZAP Fuzzer.'
172
+ $hydraOk = $false
173
+ }
174
+ Add-Row 'Hydra' 'offensive' $hydraOk 'GitHub build (fallback: ZAP Fuzzer)'
175
+
176
+ $msfOk = Test-Command 'msfconsole' '--version'
177
+ if (-not $msfOk -and $Install) {
178
+ Write-Host ' ! Metasploit: use Rapid7 Windows installer or Docker (kali) fallback.'
179
+ $msfOk = $false
180
+ }
181
+ Add-Row 'Metasploit' 'offensive' $msfOk 'Rapid7 installer / Docker (kali)'
182
+
183
+ $johnOk = Test-Command 'john' '--version'
184
+ if (-not $johnOk -and $Install) {
185
+ Write-Host ' ! John the Ripper: download Jumbo build from GitHub.'
186
+ $johnOk = $false
187
+ }
188
+ Add-Row 'John the Ripper' 'offensive' $johnOk 'GitHub Jumbo build'
189
+
190
+ # ---- Cloud Reference Tools (DigitalOcean - SCP-2026-09-02-001) ---------------
191
+ # Deferred by design (Anti-Bloat): activated only when the first app is deployed to DO.
192
+ if (-not $Quiet) {
193
+ Write-Host ''
194
+ Write-Host ' Cloud (DigitalOcean) tools are DEFERRED until first app deployment on DO:'
195
+ Write-Host ' - doctl (winget install DigitalOcean.Doctl)'
196
+ Write-Host ' - compliancekit (github.com/darpanzope/compliancekit) + DO_API_TOKEN'
197
+ Write-Host ' - DO CSPM (built into DO dashboard)'
198
+ Write-Host ' - Lynis (over SSH on Droplets)'
199
+ }
200
+
108
201
  # ---- Report ----------------------------------------------------------------
109
202
  Write-Host ""
110
203
  Write-Host ("{0,-22} {1,-10} {2,-8} {3}" -f 'Tool', 'Kind', 'Status', 'Action')