diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 767fb596..8c1b1c30 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -109,6 +109,10 @@ jobs: - name: monitor-the-situation-dashboard-frontend type: biome path: PROJECTS/advanced/monitor-the-situation-dashboard/frontend + # Frontend (biome + stylelint + tsc) + - name: ja3-ja4-tls-fingerprinting-frontend + type: frontend + path: PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/frontend # Go - name: simple-vulnerability-scanner type: go @@ -142,6 +146,9 @@ jobs: - name: binary-analysis-tool-backend type: rust path: PROJECTS/intermediate/binary-analysis-tool/backend + - name: ja3-ja4-tls-fingerprinting + type: rust + path: PROJECTS/intermediate/ja3-ja4-tls-fingerprinting # Crystal - name: credential-rotation-enforcer type: crystal @@ -184,21 +191,21 @@ jobs: if: matrix.type == 'ruff' run: pip install ruff - # Biome Setup + # Biome / Frontend Setup - name: Setup Node.js - if: matrix.type == 'biome' + if: matrix.type == 'biome' || matrix.type == 'frontend' uses: actions/setup-node@v4 with: node-version: '22' - name: Setup pnpm - if: matrix.type == 'biome' + if: matrix.type == 'biome' || matrix.type == 'frontend' uses: pnpm/action-setup@v4 with: version: 10 - name: Cache pnpm store - if: matrix.type == 'biome' + if: matrix.type == 'biome' || matrix.type == 'frontend' uses: actions/cache@v4 with: path: ~/.local/share/pnpm/store/v10 @@ -208,7 +215,7 @@ jobs: ${{ runner.os }}-pnpm- - name: Install frontend dependencies - if: matrix.type == 'biome' + if: matrix.type == 'biome' || matrix.type == 'frontend' run: pnpm install --frozen-lockfile # Go Setup @@ -333,6 +340,41 @@ jobs: cat biome-output.txt continue-on-error: true + # Frontend Linting (biome + stylelint + tsc) + - name: Run Biome, Stylelint, and tsc + if: matrix.type == 'frontend' + id: frontend + run: | + FRONTEND_OK=true + echo "Running Biome check..." + if pnpm biome check . > frontend-output.txt 2>&1; then + echo "biome: no issues" + else + FRONTEND_OK=false + echo "biome: issues found" + fi + echo "Running Stylelint..." + if pnpm stylelint "**/*.scss" >> frontend-output.txt 2>&1; then + echo "stylelint: no issues" + else + FRONTEND_OK=false + echo "stylelint: issues found" + fi + echo "Running tsc --noEmit..." + if pnpm tsc --noEmit >> frontend-output.txt 2>&1; then + echo "tsc: no issues" + else + FRONTEND_OK=false + echo "tsc: type errors found" + fi + if [[ "$FRONTEND_OK" == "true" ]]; then + echo "FRONTEND_PASSED=true" >> $GITHUB_ENV + else + echo "FRONTEND_PASSED=false" >> $GITHUB_ENV + fi + cat frontend-output.txt + continue-on-error: true + # Go Linting - name: Run golangci-lint if: matrix.type == 'go' @@ -589,6 +631,35 @@ jobs: fi } >> $GITHUB_STEP_SUMMARY + # Create Summary for Frontend + - name: Create Frontend Lint Summary + if: matrix.type == 'frontend' + run: | + { + echo "## Lint Results: ${{ matrix.name }}" + echo '' + if [[ "${{ env.FRONTEND_PASSED }}" == "true" ]]; then + echo '### Biome + Stylelint + tsc: **Passed**' + echo 'No frontend issues found.' + else + echo '### Biome + Stylelint + tsc: **Issues Found**' + echo '
View output' + echo '' + echo '```' + head -100 frontend-output.txt + echo '```' + echo '
' + fi + echo '' + if [[ "${{ env.FRONTEND_PASSED }}" == "true" ]]; then + echo '---' + echo '### All checks passed!' + else + echo '---' + echo '### Review the issues above' + fi + } >> $GITHUB_STEP_SUMMARY + # Create Summary for Go - name: Create Go Lint Summary if: matrix.type == 'go' @@ -809,6 +880,11 @@ jobs: echo "Biome lint checks failed" exit 1 fi + elif [[ "${{ matrix.type }}" == "frontend" ]]; then + if [[ "${{ env.FRONTEND_PASSED }}" == "false" ]]; then + echo "Frontend lint checks failed" + exit 1 + fi elif [[ "${{ matrix.type }}" == "go" ]]; then if [[ "${{ env.GOLANGCI_PASSED }}" == "false" ]]; then echo "Go lint checks failed" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f0ec85af..f1716f02 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -258,6 +258,33 @@ repos: files: ^PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/ pass_filenames: false + - id: biome-ja3-ja4-tls-fingerprinting + name: biome check (ja3-ja4-tls-fingerprinting frontend) + entry: bash -c 'cd PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/frontend && pnpm biome check .' + language: system + files: ^PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/frontend/src/ + pass_filenames: false + + # Stylelint SCSS Checks + - repo: local + hooks: + - id: stylelint-ja3-ja4-tls-fingerprinting + name: stylelint (ja3-ja4-tls-fingerprinting frontend) + entry: bash -c 'cd PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/frontend && pnpm stylelint "**/*.scss"' + language: system + files: ^PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/frontend/src/ + pass_filenames: false + + # TypeScript tsc Checks + - repo: local + hooks: + - id: tsc-ja3-ja4-tls-fingerprinting + name: tsc typecheck (ja3-ja4-tls-fingerprinting frontend) + entry: bash -c 'cd PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/frontend && pnpm tsc --noEmit' + language: system + files: ^PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/frontend/src/ + pass_filenames: false + # Nim nph Checks - repo: local hooks: @@ -287,6 +314,22 @@ repos: types: [rust] pass_filenames: false + - id: cargo-fmt-ja3-ja4-tls-fingerprinting + name: cargo fmt (ja3-ja4-tls-fingerprinting) + entry: bash -c 'cd PROJECTS/intermediate/ja3-ja4-tls-fingerprinting && cargo fmt --all -- --check' + language: system + files: ^PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/ + types: [rust] + pass_filenames: false + + - id: cargo-clippy-ja3-ja4-tls-fingerprinting + name: cargo clippy (ja3-ja4-tls-fingerprinting) + entry: bash -c 'cd PROJECTS/intermediate/ja3-ja4-tls-fingerprinting && cargo clippy --workspace --all-targets -- -D warnings' + language: system + files: ^PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/ + types: [rust] + pass_filenames: false + # Crystal Checks (format + ameba + compile) - repo: local hooks: @@ -406,9 +449,9 @@ repos: - id: check-symlinks exclude: (\.pnpm-store|node_modules)/ - id: end-of-file-fixer - exclude: (\.pnpm-store|node_modules)/|^PROJECTS/advanced/hsm-emulator/vendor/ + exclude: (\.pnpm-store|node_modules)/|^PROJECTS/advanced/hsm-emulator/vendor/|^PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/crates/tlsfp-intel/seeds/ - id: trailing-whitespace - exclude: (\.pnpm-store|node_modules)/|^PROJECTS/advanced/hsm-emulator/vendor/ + exclude: (\.pnpm-store|node_modules)/|^PROJECTS/advanced/hsm-emulator/vendor/|^PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/crates/tlsfp-intel/seeds/ - id: check-illegal-windows-names exclude: (\.pnpm-store|node_modules)/ - id: check-executables-have-shebangs diff --git a/PROJECTS/advanced/hsm-emulator/examples/smoke.zig b/PROJECTS/advanced/hsm-emulator/examples/smoke.zig index 876eee58..1f8389be 100644 --- a/PROJECTS/advanced/hsm-emulator/examples/smoke.zig +++ b/PROJECTS/advanced/hsm-emulator/examples/smoke.zig @@ -319,11 +319,15 @@ pub fn main() !void { var rsapub_tmpl = [_]ck.CK_ATTRIBUTE{ .{ .type = ck.CKA_MODULUS_BITS, .pValue = &rsa_bits, .ulValueLen = @sizeOf(ck.CK_ULONG) }, .{ .type = ck.CKA_VERIFY, .pValue = &ck_yes, .ulValueLen = 1 }, + .{ .type = ck.CKA_VERIFY_RECOVER, .pValue = &ck_yes, .ulValueLen = 1 }, .{ .type = ck.CKA_ENCRYPT, .pValue = &ck_yes, .ulValueLen = 1 }, + .{ .type = ck.CKA_WRAP, .pValue = &ck_yes, .ulValueLen = 1 }, }; var rsapriv_tmpl = [_]ck.CK_ATTRIBUTE{ .{ .type = ck.CKA_SIGN, .pValue = &ck_yes, .ulValueLen = 1 }, + .{ .type = ck.CKA_SIGN_RECOVER, .pValue = &ck_yes, .ulValueLen = 1 }, .{ .type = ck.CKA_DECRYPT, .pValue = &ck_yes, .ulValueLen = 1 }, + .{ .type = ck.CKA_UNWRAP, .pValue = &ck_yes, .ulValueLen = 1 }, .{ .type = ck.CKA_PRIVATE, .pValue = &ck_false, .ulValueLen = 1 }, }; var h_rsapub: ck.CK_OBJECT_HANDLE = 0; diff --git a/PROJECTS/advanced/hsm-emulator/src/api/object.zig b/PROJECTS/advanced/hsm-emulator/src/api/object.zig index 88b8ecf6..95c5ce11 100644 --- a/PROJECTS/advanced/hsm-emulator/src/api/object.zig +++ b/PROJECTS/advanced/hsm-emulator/src/api/object.zig @@ -86,6 +86,21 @@ pub fn materializeDefaults(obj: *Object, allocator: std.mem.Allocator, class: ck const def: u8 = if (class == ck.CKO_PRIVATE_KEY) ck.CK_TRUE else ck.CK_FALSE; try obj.set(allocator, ck.CKA_PRIVATE, &[_]u8{def}); } + switch (class) { + ck.CKO_PUBLIC_KEY => { + const attrs = [_]ck.CK_ATTRIBUTE_TYPE{ ck.CKA_ENCRYPT, ck.CKA_VERIFY, ck.CKA_VERIFY_RECOVER, ck.CKA_WRAP, ck.CKA_DERIVE }; + for (attrs) |a| if (!obj.has(a)) try obj.set(allocator, a, &[_]u8{ck.CK_FALSE}); + }, + ck.CKO_PRIVATE_KEY => { + const attrs = [_]ck.CK_ATTRIBUTE_TYPE{ ck.CKA_DECRYPT, ck.CKA_SIGN, ck.CKA_SIGN_RECOVER, ck.CKA_UNWRAP, ck.CKA_DERIVE, ck.CKA_ALWAYS_AUTHENTICATE }; + for (attrs) |a| if (!obj.has(a)) try obj.set(allocator, a, &[_]u8{ck.CK_FALSE}); + }, + ck.CKO_SECRET_KEY => { + const attrs = [_]ck.CK_ATTRIBUTE_TYPE{ ck.CKA_ENCRYPT, ck.CKA_DECRYPT, ck.CKA_SIGN, ck.CKA_VERIFY, ck.CKA_WRAP, ck.CKA_UNWRAP, ck.CKA_DERIVE }; + for (attrs) |a| if (!obj.has(a)) try obj.set(allocator, a, &[_]u8{ck.CK_FALSE}); + }, + else => {}, + } } pub fn insertNew(inst: *state.Instance, sess: *session.Session, obj_in: Object, phObject: *ck.CK_OBJECT_HANDLE) ck.CK_RV { diff --git a/PROJECTS/advanced/monitor-the-situation-dashboard/Justfile b/PROJECTS/advanced/monitor-the-situation-dashboard/Justfile index 6a21c33b..7826d0db 100644 --- a/PROJECTS/advanced/monitor-the-situation-dashboard/Justfile +++ b/PROJECTS/advanced/monitor-the-situation-dashboard/Justfile @@ -221,10 +221,7 @@ prod-restart: docker compose --env-file .env.prod -f compose.yml -f cloudflared.compose.yml logs -f [group('tunnel')] -prod-redeploy: - docker compose --env-file .env.prod -f compose.yml -f cloudflared.compose.yml down - docker compose --env-file .env.prod -f compose.yml -f cloudflared.compose.yml up -d --build - docker compose --env-file .env.prod -f compose.yml -f cloudflared.compose.yml logs -f +redeploy: (tunnel-down "--remove-orphans") (tunnel-start "--remove-orphans") [group('tunnel')] prod-logs *SERVICE: diff --git a/PROJECTS/beginner/canary-token-generator/frontend/src/pages/landing/copy.ts b/PROJECTS/beginner/canary-token-generator/frontend/src/pages/landing/copy.ts index b5ede77e..6297336e 100644 --- a/PROJECTS/beginner/canary-token-generator/frontend/src/pages/landing/copy.ts +++ b/PROJECTS/beginner/canary-token-generator/frontend/src/pages/landing/copy.ts @@ -12,7 +12,7 @@ export const PAGE_COPY = { 'Field-deployable trip-wires for the quiet hours. Each specimen waits in place, reports when touched, and leaves a forensic note behind.', STRIP_FIELD_STATION: 'FIELD STATION', STRIP_ISSUE: 'ISSUE', - STRIP_VOLUME: 'VOL.001', + STRIP_VOLUME: 'SPEC.003', STRIP_FOLIO: 'FOLIO', SECTION_01_INDEX: '01 / SPECIES', SECTION_01_TITLE: 'SELECT SPECIES', diff --git a/PROJECTS/beginner/canary-token-generator/justfile b/PROJECTS/beginner/canary-token-generator/justfile index f7b18231..5652d804 100644 --- a/PROJECTS/beginner/canary-token-generator/justfile +++ b/PROJECTS/beginner/canary-token-generator/justfile @@ -153,6 +153,9 @@ ps: # Docker Compose (Production + Cloudflare Tunnel) # ============================================================================= +[group('tunnel')] +redeploy: (tunnel-down "--remove-orphans") build (tunnel-start "--remove-orphans") + [group('tunnel')] tunnel-up *ARGS: docker compose --env-file .env -f compose.yml -f cloudflared.compose.yml up {{ARGS}} diff --git a/PROJECTS/intermediate/binary-analysis-tool/frontend/.npmrc b/PROJECTS/intermediate/binary-analysis-tool/frontend/.npmrc new file mode 100644 index 00000000..a3eb4719 --- /dev/null +++ b/PROJECTS/intermediate/binary-analysis-tool/frontend/.npmrc @@ -0,0 +1,4 @@ +# ©AngelaMos | 2026 +# .npmrc +strict-dep-builds=false +auto-install-peers=true diff --git a/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/android-chrome-192x192.png b/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/android-chrome-192x192.png index 7788e65c..b65bfac0 100644 Binary files a/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/android-chrome-192x192.png and b/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/android-chrome-192x192.png differ diff --git a/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/android-chrome-512x512.png b/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/android-chrome-512x512.png index eb1b8435..af158f3e 100644 Binary files a/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/android-chrome-512x512.png and b/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/android-chrome-512x512.png differ diff --git a/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/apple-touch-icon.png b/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/apple-touch-icon.png index e8f17624..f8afdc43 100644 Binary files a/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/apple-touch-icon.png and b/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/apple-touch-icon.png differ diff --git a/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/favicon-16x16.png b/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/favicon-16x16.png index 70624955..11c59c2e 100644 Binary files a/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/favicon-16x16.png and b/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/favicon-16x16.png differ diff --git a/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/favicon-32x32.png b/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/favicon-32x32.png index 48cd1bca..e3d66e70 100644 Binary files a/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/favicon-32x32.png and b/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/favicon-32x32.png differ diff --git a/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/favicon.ico b/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/favicon.ico index bf4991d6..edcbe053 100644 Binary files a/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/favicon.ico and b/PROJECTS/intermediate/binary-analysis-tool/frontend/public/assets/favicon.ico differ diff --git a/PROJECTS/intermediate/binary-analysis-tool/frontend/src/pages/analysis/index.tsx b/PROJECTS/intermediate/binary-analysis-tool/frontend/src/pages/analysis/index.tsx index 122d75c7..01f95dc8 100644 --- a/PROJECTS/intermediate/binary-analysis-tool/frontend/src/pages/analysis/index.tsx +++ b/PROJECTS/intermediate/binary-analysis-tool/frontend/src/pages/analysis/index.tsx @@ -120,7 +120,7 @@ export function Component(): React.ReactElement { if (isLoading) { return (
- ANALYZING SPECIMEN\u2026 + ANALYZING SUBJECT\u2026
) } @@ -129,7 +129,7 @@ export function Component(): React.ReactElement { return (
404 - SPECIMEN NOT FOUND + SUBJECT NOT FOUND NEW ANALYSIS diff --git a/PROJECTS/intermediate/binary-analysis-tool/frontend/src/pages/landing/index.tsx b/PROJECTS/intermediate/binary-analysis-tool/frontend/src/pages/landing/index.tsx index 5aaa5144..83d23bf5 100644 --- a/PROJECTS/intermediate/binary-analysis-tool/frontend/src/pages/landing/index.tsx +++ b/PROJECTS/intermediate/binary-analysis-tool/frontend/src/pages/landing/index.tsx @@ -5,7 +5,7 @@ // Binary upload landing page with drag-and-drop file // intake and analysis pipeline visualization // -// Renders the Axumortem specimen intake interface: an +// Renders the Axumortem subject intake interface: an // animated SVG grain background, hex offset margin // decoration (16 addresses), corner brackets, meta // strip header, and format support badges (ELF/PE/ @@ -143,7 +143,7 @@ export function Component(): React.ReactElement {