wxp.tmpl 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Gitleaks Security Findings Report</title>
  7. <style>
  8. :root {
  9. --primary-color: #2c5fb2;
  10. --primary-color-rgb: 44, 95, 178;
  11. --primary-dark: #224486;
  12. --primary-light: #356bc9;
  13. --secondary-color: #eef3ff;
  14. --surface-color: #ffffff;
  15. --border-color: #7da2ce;
  16. --text-color: #000000;
  17. --text-light: #3a6ea5;
  18. --text-inverse: #ffffff;
  19. --error-color: #cc0000;
  20. --warning-color: #ffaa00;
  21. --success-color: #50c878;
  22. --highlight-color: rgba(44, 95, 178, 0.2);
  23. --highlight-secret: rgba(204, 0, 0, 0.2);
  24. --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  25. --radius: 8px;
  26. --font-mono: 'Lucida Console', monospace;
  27. --font-main: 'Tahoma', 'Segoe UI', sans-serif;
  28. }
  29. * {
  30. margin: 0;
  31. padding: 0;
  32. box-sizing: border-box;
  33. }
  34. html, body {
  35. height: 100%;
  36. font-family: var(--font-main);
  37. font-size: 16px;
  38. line-height: 1.5;
  39. color: var(--text-color);
  40. background-color: var(--surface-color);
  41. background: linear-gradient(to bottom, #a1c8e9, #2573d1);
  42. background-attachment: fixed;
  43. }
  44. .app-container {
  45. display: flex;
  46. flex-direction: column;
  47. height: 100%;
  48. max-width: 100%;
  49. overflow: hidden;
  50. border-radius: 8px;
  51. box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  52. border: 1px solid #7da2ce;
  53. }
  54. .app-header {
  55. height: 36px;
  56. background: linear-gradient(to bottom, #3689de, #2c5fb2, #2151a3);
  57. color: var(--text-inverse);
  58. display: flex;
  59. align-items: center;
  60. justify-content: space-between;
  61. padding: 0 12px;
  62. flex-shrink: 0;
  63. box-shadow: var(--shadow);
  64. z-index: 10;
  65. border-bottom: 1px solid #1a3c71;
  66. }
  67. .logo h1 {
  68. font-size: 16px;
  69. font-weight: bold;
  70. margin: 0;
  71. padding: 0;
  72. text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
  73. }
  74. .btn {
  75. display: inline-flex;
  76. align-items: center;
  77. justify-content: center;
  78. background: linear-gradient(to bottom, #f1f8fe, #d8e6f6);
  79. color: #000000;
  80. border: 1px solid #7da2ce;
  81. border-radius: 3px;
  82. font-size: 12px;
  83. padding: 4px 8px;
  84. box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  85. cursor: pointer;
  86. transition: background-color 0.2s, color 0.2s;
  87. font-family: var(--font-main);
  88. }
  89. .btn:hover {
  90. background: linear-gradient(to bottom, #e5f1fd, #c7ddfa);
  91. }
  92. .btn:active {
  93. background: linear-gradient(to bottom, #c7ddfa, #e5f1fd);
  94. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset;
  95. }
  96. .btn-primary {
  97. background: linear-gradient(to bottom, #3689de, #2c5fb2);
  98. color: white;
  99. border: 1px solid #1a3c71;
  100. }
  101. .btn-primary:hover {
  102. background: linear-gradient(to bottom, #4397e9, #3670c3);
  103. }
  104. .btn-primary:active {
  105. background: linear-gradient(to bottom, #2151a3, #3689de);
  106. }
  107. .btn-sm {
  108. padding: 2px 5px;
  109. font-size: 0.75rem;
  110. }
  111. .app-main {
  112. flex: 1;
  113. overflow: auto;
  114. padding: 1.5rem;
  115. }
  116. .report-info {
  117. background-color: #eef3ff;
  118. border: 1px solid #7da2ce;
  119. border-radius: 5px;
  120. padding: 12px;
  121. margin-bottom: 15px;
  122. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  123. }
  124. .report-info h2 {
  125. color: #2c5fb2;
  126. margin-top: 0;
  127. font-size: 18px;
  128. }
  129. .report-date {
  130. color: #3a6ea5;
  131. font-size: 12px;
  132. }
  133. .report-stats {
  134. display: flex;
  135. gap: 1.5rem;
  136. margin-top: 1rem;
  137. flex-wrap: wrap;
  138. }
  139. .stat-item {
  140. display: flex;
  141. flex-direction: column;
  142. gap: 0.25rem;
  143. }
  144. .stat-value {
  145. font-size: 1.25rem;
  146. font-weight: 600;
  147. color: #2c5fb2;
  148. }
  149. .stat-label {
  150. font-size: 0.875rem;
  151. color: var(--text-light);
  152. }
  153. .table-wrapper {
  154. overflow-x: auto;
  155. border: 1px solid #7da2ce;
  156. border-radius: 5px;
  157. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  158. }
  159. .findings-table {
  160. width: 100%;
  161. border-collapse: collapse;
  162. font-size: 0.875rem;
  163. }
  164. .findings-table th {
  165. background: linear-gradient(to bottom, #e5f1fd, #c7ddfa);
  166. color: #2c5fb2;
  167. font-weight: bold;
  168. font-size: 13px;
  169. padding: 8px;
  170. border: 1px solid #7da2ce;
  171. text-align: left;
  172. position: sticky;
  173. top: 0;
  174. z-index: 1;
  175. }
  176. /* Ensure table cells don't expand too much */
  177. .findings-table td {
  178. background-color: #ffffff;
  179. border: 1px solid #d9e6f7;
  180. font-size: 12px;
  181. padding: 8px;
  182. vertical-align: top;
  183. max-width: 300px; /* Limit width of all cells */
  184. overflow-wrap: break-word;
  185. }
  186. .findings-table tr:nth-child(even) td {
  187. background-color: #f5f9ff;
  188. }
  189. .findings-table tr:hover td {
  190. background-color: #e5f1fd;
  191. }
  192. .findings-table th:nth-child(1) { width: 12%; } /* Rule */
  193. .findings-table th:nth-child(2) { width: 20%; } /* File */
  194. .findings-table th:nth-child(3) { width: 25%; } /* Description */
  195. .findings-table th:nth-child(4) { width: 20%; } /* Secret */
  196. .findings-table th:nth-child(5) { width: 23%; } /* Metadata */
  197. .secret-container {
  198. position: relative;
  199. }
  200. .match-toggle {
  201. display: inline-block;
  202. margin-top: 0.5rem;
  203. background: linear-gradient(to bottom, #f1f8fe, #d8e6f6);
  204. border: 1px solid #7da2ce;
  205. color: #2c5fb2;
  206. font-size: 11px;
  207. border-radius: 3px;
  208. padding: 2px 5px;
  209. cursor: pointer;
  210. }
  211. .match-toggle:hover {
  212. background: linear-gradient(to bottom, #e5f1fd, #c7ddfa);
  213. }
  214. .hidden {
  215. display: none !important;
  216. }
  217. .secret-match {
  218. font-family: var(--font-mono);
  219. font-size: 0.875rem;
  220. word-break: break-all;
  221. white-space: pre-wrap;
  222. display: block;
  223. background-color: #f9f2f2;
  224. border: 1px solid #e0c0c0;
  225. border-radius: 3px;
  226. padding: 0.5rem;
  227. overflow-x: auto;
  228. }
  229. .tag-list {
  230. display: flex;
  231. gap: 0.25rem;
  232. flex-wrap: wrap;
  233. }
  234. .tag {
  235. display: inline-block;
  236. padding: 2px 5px;
  237. background-color: #3689de;
  238. color: var(--text-inverse);
  239. border-radius: 3px;
  240. font-size: 10px;
  241. margin: 2px;
  242. }
  243. .meta-row {
  244. display: grid;
  245. grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  246. gap: 0.5rem;
  247. margin-top: 0.5rem;
  248. font-size: 0.75rem;
  249. color: var(--text-light);
  250. }
  251. .meta-item {
  252. display: flex;
  253. align-items: center;
  254. gap: 0.25rem;
  255. }
  256. .meta-label {
  257. font-weight: 500;
  258. color: #2c5fb2;
  259. }
  260. .meta-value {
  261. font-family: var(--font-mono);
  262. word-break: break-all;
  263. }
  264. .code-preview {
  265. position: relative;
  266. font-family: var(--font-mono);
  267. font-size: 0.875rem;
  268. background-color: var(--secondary-color);
  269. padding: 0.5rem;
  270. border-radius: var(--radius);
  271. overflow-x: auto;
  272. margin-top: 0.5rem;
  273. white-space: pre-wrap;
  274. word-break: break-all;
  275. }
  276. .filters {
  277. margin-bottom: 15px;
  278. background-color: #eef3ff;
  279. padding: 10px;
  280. border: 1px solid #7da2ce;
  281. border-radius: 5px;
  282. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  283. display: flex;
  284. gap: 1rem;
  285. flex-wrap: wrap;
  286. }
  287. .filter-group {
  288. display: flex;
  289. align-items: center;
  290. gap: 0.5rem;
  291. margin-right: 15px;
  292. }
  293. .filter-label {
  294. font-size: 12px;
  295. font-weight: bold;
  296. color: #2c5fb2;
  297. }
  298. .filter-input {
  299. background-color: white;
  300. border: 1px solid #7da2ce;
  301. border-radius: 3px;
  302. padding: 3px 6px;
  303. font-size: 12px;
  304. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) inset;
  305. font-family: var(--font-main);
  306. }
  307. .app-footer {
  308. background: linear-gradient(to bottom, #eef3ff, #d8e6f6);
  309. border-top: 1px solid #7da2ce;
  310. font-size: 11px;
  311. padding: 8px 12px;
  312. color: #2c5fb2;
  313. height: auto;
  314. display: flex;
  315. align-items: center;
  316. justify-content: space-between;
  317. flex-shrink: 0;
  318. }
  319. .description-toggle {
  320. cursor: pointer;
  321. color: #2c5fb2;
  322. font-size: 0.875rem;
  323. margin-left: 0.5rem;
  324. display: inline-flex;
  325. align-items: center;
  326. justify-content: center;
  327. width: 20px;
  328. height: 20px;
  329. border-radius: 50%;
  330. background: linear-gradient(to bottom, #f1f8fe, #d8e6f6);
  331. border: 1px solid #7da2ce;
  332. box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  333. vertical-align: middle;
  334. }
  335. .description-toggle:hover {
  336. background-color: var(--primary-light);
  337. color: var(--text-inverse);
  338. }
  339. .description-expanded {
  340. white-space: normal;
  341. }
  342. .description-collapsed {
  343. white-space: nowrap;
  344. overflow: hidden;
  345. text-overflow: ellipsis;
  346. max-width: 250px;
  347. display: inline-block;
  348. }
  349. .commit-link {
  350. color: #2c5fb2;
  351. text-decoration: none;
  352. }
  353. .commit-link:hover {
  354. text-decoration: underline;
  355. }
  356. /* File path styling */
  357. .file-path-container {
  358. max-width: 100%;
  359. }
  360. .file-path {
  361. display: inline-block;
  362. max-width: 100%;
  363. word-wrap: break-word;
  364. word-break: break-all;
  365. }
  366. .match-content {
  367. font-family: var(--font-mono);
  368. font-size: 0.875rem;
  369. word-break: break-all;
  370. white-space: pre-wrap;
  371. display: block;
  372. background-color: #f9f9f9;
  373. border: 1px solid #d0d0d0;
  374. border-radius: 3px;
  375. padding: 0.5rem;
  376. margin-top: 0.5rem;
  377. max-height: 300px;
  378. overflow-y: auto;
  379. }
  380. @media (max-width: 768px) {
  381. .app-header {
  382. padding: 0 1rem;
  383. }
  384. .app-main {
  385. padding: 1rem;
  386. }
  387. .report-stats {
  388. flex-direction: column;
  389. gap: 0.75rem;
  390. }
  391. .filters {
  392. flex-direction: column;
  393. gap: 0.75rem;
  394. }
  395. .app-footer {
  396. flex-direction: column;
  397. height: auto;
  398. padding: 0.75rem 1rem;
  399. gap: 0.5rem;
  400. justify-content: center;
  401. text-align: center;
  402. }
  403. }
  404. </style>
  405. </head>
  406. <body>
  407. <div class="app-container">
  408. <header class="app-header">
  409. <div class="logo">
  410. <h1>Gitleaks Security Findings</h1>
  411. </div>
  412. </header>
  413. <main class="app-main">
  414. <div class="report-info">
  415. <h2>Security Scan Report</h2>
  416. <p class="report-date">Generated on {{now | date "Jan 02, 2006 15:04:05 MST"}}</p>
  417. <div class="report-stats">
  418. <div class="stat-item">
  419. <span class="stat-value">{{len .}}</span>
  420. <span class="stat-label">Total Findings</span>
  421. </div>
  422. <div class="stat-item">
  423. <span class="stat-value" id="filesCount">-</span>
  424. <span class="stat-label">Files Affected</span>
  425. </div>
  426. <div class="stat-item">
  427. <span class="stat-value" id="rulesCount">-</span>
  428. <span class="stat-label">Unique Rules Triggered</span>
  429. </div>
  430. <div class="stat-item" id="scanModeContainer">
  431. <span class="stat-value" id="scanMode">-</span>
  432. <span class="stat-label">Scan Mode</span>
  433. </div>
  434. </div>
  435. </div>
  436. <div class="filters">
  437. <div class="filter-group">
  438. <label class="filter-label" for="filterRule">Filter by Rule:</label>
  439. <select class="filter-input" id="filterRule">
  440. <option value="all">All Rules</option>
  441. <!-- Rule options will be populated by JavaScript -->
  442. </select>
  443. </div>
  444. <div class="filter-group">
  445. <label class="filter-label" for="filterFile">Filter by File:</label>
  446. <input type="text" class="filter-input" id="filterFile" placeholder="Enter filename...">
  447. </div>
  448. <div class="filter-group">
  449. <button class="btn btn-primary btn-sm" id="resetFilters">Reset Filters</button>
  450. </div>
  451. </div>
  452. <div class="table-wrapper">
  453. <table class="findings-table" id="findingsTable">
  454. <thead>
  455. <tr>
  456. <th>Rule</th>
  457. <th>File</th>
  458. <th>Description</th>
  459. <th>Secret</th>
  460. <th>Metadata</th>
  461. </tr>
  462. </thead>
  463. <tbody>
  464. {{- range . }}
  465. <tr data-rule="{{.RuleID}}" data-file="{{.File}}">
  466. <td>{{.RuleID}}</td>
  467. <td>
  468. <div class="file-path-container">
  469. <span class="file-path" title="{{.File}}">{{.File}}</span>
  470. </div>
  471. <div class="tag-list">
  472. {{- range .Tags }}
  473. <span class="tag">{{.}}</span>
  474. {{- end}}
  475. </div>
  476. <div class="meta-row">
  477. <div class="meta-item">
  478. <span class="meta-label">Line:</span>
  479. <span class="meta-value">{{.StartLine}}</span>
  480. </div>
  481. </div>
  482. </td>
  483. <td>
  484. <span class="description-text">{{.Description}}</span>
  485. <span class="description-toggle" title="Expand/Collapse">↕</span>
  486. </td>
  487. <td>
  488. <div class="secret-container" data-secret="{{.Secret}}" data-match="{{.Match}}">
  489. <div class="secret-match">{{.Secret}}</div>
  490. <button type="button" class="match-toggle" title="Show/Hide Full Match Context">Show Context</button>
  491. <div class="match-content hidden" data-raw-match="{{.Match}}">{{.Match}}</div>
  492. </div>
  493. </td>
  494. <td>
  495. <div class="meta-row">
  496. <div class="meta-item">
  497. <span class="meta-label">Entropy:</span>
  498. <span class="meta-value">{{printf "%.2f" .Entropy}}</span>
  499. </div>
  500. {{- if .Commit}}
  501. <div class="meta-item commit-info">
  502. <span class="meta-label">Commit:</span>
  503. <span class="meta-value">{{if gt (len .Commit) 7}}{{printf "%.7s" .Commit}}{{else}}{{.Commit}}{{end}}</span>
  504. </div>
  505. {{- if .Author}}
  506. <div class="meta-item commit-info">
  507. <span class="meta-label">Author:</span>
  508. <span class="meta-value">{{.Author}}</span>
  509. </div>
  510. {{- end}}
  511. {{- if .Date}}
  512. <div class="meta-item commit-info">
  513. <span class="meta-label">Date:</span>
  514. <span class="meta-value">{{.Date}}</span>
  515. </div>
  516. {{- end}}
  517. {{- if .Link}}
  518. <div class="meta-item commit-info">
  519. <span class="meta-label">Link:</span>
  520. <span class="meta-value"><a href="{{.Link}}" target="_blank" class="commit-link">View Commit</a></span>
  521. </div>
  522. {{- end}}
  523. {{- else}}
  524. {{- if .Author}}
  525. <div class="meta-item">
  526. <span class="meta-label">Author:</span>
  527. <span class="meta-value">{{.Author}}</span>
  528. </div>
  529. {{- end}}
  530. {{- end}}
  531. </div>
  532. {{- if not .Match}}
  533. <div class="match-content" data-raw-match="">-</div>
  534. {{- end}}
  535. </td>
  536. </tr>
  537. {{- end }}
  538. </tbody>
  539. </table>
  540. </div>
  541. </main>
  542. <footer class="app-footer">
  543. <div>Generated by Gitleaks</div>
  544. <div>Total Findings: <strong>{{len .}}</strong></div>
  545. </footer>
  546. </div>
  547. <script>
  548. // Process data to collect unique files and rules
  549. function processData() {
  550. const rows = document.querySelectorAll('#findingsTable tbody tr');
  551. const uniqueRules = new Set();
  552. const uniqueFiles = new Set();
  553. let isGitMode = false;
  554. if (rows.length > 0) {
  555. // Check if first finding has commit data to determine mode
  556. const firstRow = rows[0];
  557. const commitCells = firstRow.querySelectorAll('.commit-info');
  558. isGitMode = commitCells.length > 0 && commitCells[0].textContent.trim() !== '';
  559. }
  560. // Set scan mode
  561. document.getElementById('scanMode').textContent = isGitMode ? 'Git' : 'Directory';
  562. // Adjust UI based on mode
  563. if (isGitMode) {
  564. // Ensure commit info columns are visible for git mode
  565. document.querySelectorAll('.commit-info').forEach(el => {
  566. el.style.display = 'block';
  567. });
  568. } else {
  569. // Hide commit-specific UI elements for directory mode
  570. document.querySelectorAll('.commit-info').forEach(el => {
  571. el.style.display = 'none';
  572. });
  573. }
  574. rows.forEach(row => {
  575. uniqueRules.add(row.dataset.rule);
  576. uniqueFiles.add(row.dataset.file);
  577. });
  578. // Update stats
  579. document.getElementById('filesCount').textContent = uniqueFiles.size;
  580. document.getElementById('rulesCount').textContent = uniqueRules.size;
  581. // Populate rule filter dropdown
  582. const ruleFilter = document.getElementById('filterRule');
  583. const sortedRules = Array.from(uniqueRules).sort();
  584. sortedRules.forEach(rule => {
  585. const option = document.createElement('option');
  586. option.value = rule;
  587. option.textContent = rule;
  588. ruleFilter.appendChild(option);
  589. });
  590. }
  591. // Hide toggle button if match is same as secret
  592. function hideRedundantToggleButtons() {
  593. document.querySelectorAll('.secret-container').forEach(container => {
  594. const secret = container.getAttribute('data-secret');
  595. const match = container.getAttribute('data-match');
  596. const toggleButton = container.querySelector('.match-toggle');
  597. // If secret and match are the same, or if match is empty, hide the toggle button
  598. if ((secret && match && secret.trim() === match.trim()) || !match) {
  599. if (toggleButton) {
  600. toggleButton.style.display = 'none';
  601. }
  602. }
  603. });
  604. }
  605. // Setup toggle buttons
  606. function setupToggleButtons() {
  607. document.querySelectorAll('.match-toggle').forEach(btn => {
  608. btn.addEventListener('click', function() {
  609. const matchContent = this.nextElementSibling;
  610. if (matchContent.classList.contains('hidden')) {
  611. matchContent.classList.remove('hidden');
  612. this.textContent = 'Hide Context';
  613. } else {
  614. matchContent.classList.add('hidden');
  615. this.textContent = 'Show Context';
  616. }
  617. });
  618. });
  619. // Setup description toggle
  620. document.querySelectorAll('.description-text').forEach(descriptionText => {
  621. const toggleBtn = descriptionText.nextElementSibling;
  622. if (!toggleBtn || !toggleBtn.classList.contains('description-toggle')) return;
  623. // Initial state: collapsed
  624. descriptionText.classList.add('description-collapsed');
  625. toggleBtn.addEventListener('click', () => {
  626. if (descriptionText.classList.contains('description-collapsed')) {
  627. descriptionText.classList.remove('description-collapsed');
  628. descriptionText.classList.add('description-expanded');
  629. toggleBtn.textContent = '↑';
  630. } else {
  631. descriptionText.classList.remove('description-expanded');
  632. descriptionText.classList.add('description-collapsed');
  633. toggleBtn.textContent = '↕';
  634. }
  635. });
  636. });
  637. }
  638. // Filter functionality
  639. function applyFilters() {
  640. const ruleFilter = document.getElementById('filterRule').value;
  641. const fileFilter = document.getElementById('filterFile').value.toLowerCase();
  642. const rows = document.querySelectorAll('#findingsTable tbody tr');
  643. rows.forEach(row => {
  644. const ruleMatch = ruleFilter === 'all' || row.dataset.rule === ruleFilter;
  645. const fileMatch = fileFilter === '' || row.dataset.file.toLowerCase().includes(fileFilter);
  646. if (ruleMatch && fileMatch) {
  647. row.style.display = '';
  648. } else {
  649. row.style.display = 'none';
  650. }
  651. });
  652. // Update visible count
  653. const visibleFindings = document.querySelectorAll('#findingsTable tbody tr:not([style*="display: none"])').length;
  654. document.querySelector('.app-footer strong').textContent = visibleFindings;
  655. }
  656. document.getElementById('filterRule').addEventListener('change', applyFilters);
  657. document.getElementById('filterFile').addEventListener('input', applyFilters);
  658. document.getElementById('resetFilters').addEventListener('click', function() {
  659. document.getElementById('filterRule').value = 'all';
  660. document.getElementById('filterFile').value = '';
  661. applyFilters();
  662. });
  663. // Initialize
  664. document.addEventListener('DOMContentLoaded', function() {
  665. processData();
  666. hideRedundantToggleButtons(); // Hide toggle buttons for matching secrets
  667. setupToggleButtons();
  668. });
  669. </script>
  670. </body>
  671. </html>