Skip to content

Commit 889c451

Browse files
Review SCM files and security updates (#3)
- Containerfile: Fix mixed package managers (apt-get/apk), correct wolfi-base tag (was using Debian bookworm-slim), use adduser instead of useradd, update to rust:1.83-alpine, use wget instead of curl for healthcheck - flake.nix: Correct license to dual MIT/AGPL-3.0-or-later, update homepage URL, replace docker with podman per RSR container policy - STATE.scm: Update project status to reflect security hardening phase, document high-priority issues (SHA-pinned actions, client migration) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9e857b7 commit 889c451

3 files changed

Lines changed: 55 additions & 30 deletions

File tree

STATE.scm

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,43 @@
33
;; SPDX-FileCopyrightText: 2025 Jonathan D.A. Jewell
44

55
(define metadata
6-
'((version . "0.1.0") (updated . "2025-12-15") (project . "universal-language-server-plugin")))
6+
'((version . "0.1.0") (updated . "2025-12-17") (project . "universal-language-server-plugin")))
77

88
(define current-position
9-
'((phase . "v0.1 - Initial Setup")
10-
(overall-completion . 25)
11-
(components ((rsr-compliance ((status . "complete") (completion . 100)))))))
9+
'((phase . "v0.1 - Security Hardening")
10+
(overall-completion . 35)
11+
(components
12+
((rsr-compliance ((status . "complete") (completion . 100)))
13+
(containerfile ((status . "fixed") (completion . 100)))
14+
(flake-nix ((status . "fixed") (completion . 100)))
15+
(ci-security ((status . "in-progress") (completion . 70)))
16+
(client-migration ((status . "pending") (completion . 0)))))))
1217

13-
(define blockers-and-issues '((critical ()) (high-priority ())))
18+
(define blockers-and-issues
19+
'((critical ())
20+
(high-priority
21+
(("SHA-pin CI workflow actions" . "security")
22+
("Convert VS Code client to ReScript" . "rsr-policy")
23+
("Convert Sublime client to ReScript" . "rsr-policy")))))
1424

1525
(define critical-next-actions
16-
'((immediate (("Verify CI/CD" . high))) (this-week (("Expand tests" . medium)))))
26+
'((immediate
27+
(("SHA-pin GitHub Actions" . high)
28+
("Add security.txt" . medium)))
29+
(this-week
30+
(("Client ReScript migration" . high)
31+
("Expand test coverage" . medium)
32+
("Add cargo-audit to CI" . medium)))))
1733

1834
(define session-history
19-
'((snapshots ((date . "2025-12-15") (session . "initial") (notes . "SCM files added")))))
35+
'((snapshots
36+
((date . "2025-12-15") (session . "initial") (notes . "SCM files added"))
37+
((date . "2025-12-17") (session . "security-review")
38+
(notes . "Fixed Containerfile (mixed pkg mgr, wrong base), flake.nix (license, docker refs)")))))
2039

2140
(define state-summary
22-
'((project . "universal-language-server-plugin") (completion . 25) (blockers . 0) (updated . "2025-12-15")))
41+
'((project . "universal-language-server-plugin")
42+
(completion . 35)
43+
(blockers . 0)
44+
(high-priority-issues . 3)
45+
(updated . "2025-12-17")))

deployment/Containerfile

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
# Universal Language Connector - Dockerfile
1+
# Universal Language Connector - Containerfile
22
# Multi-stage build for optimal image size
3+
# SPDX-License-Identifier: MIT OR AGPL-3.0-or-later
34

4-
# Build stage
5-
FROM rust:1.75-slim as builder
5+
# Build stage - use rust:alpine for musl-based static binary
6+
FROM rust:1.83-alpine AS builder
67

78
WORKDIR /build
89

9-
# Install build dependencies
10-
RUN apt-get update && apk add --no-cache -y \
11-
pkg-config \
12-
libssl-dev \
13-
&& rm -rf /var/lib/apt/lists/*
10+
# Install build dependencies (Alpine uses apk)
11+
RUN apk add --no-cache \
12+
musl-dev \
13+
pkgconfig \
14+
openssl-dev \
15+
openssl-libs-static
1416

1517
# Copy manifests
1618
COPY server/Cargo.toml server/Cargo.lock ./
@@ -24,37 +26,37 @@ RUN mkdir src && \
2426
# Copy source code
2527
COPY server/src ./src
2628

27-
# Build for release
29+
# Build for release with static linking
2830
RUN cargo build --release --bin universal-connector-server
2931

30-
# Runtime stage
31-
FROM cgr.dev/chainguard/wolfi-base:bookworm-slim
32+
# Runtime stage - use wolfi distroless for security
33+
FROM cgr.dev/chainguard/wolfi-base:latest
3234

3335
WORKDIR /app
3436

35-
# Install runtime dependencies
36-
RUN apt-get update && apk add --no-cache -y \
37+
# Install minimal runtime dependencies (wolfi uses apk)
38+
RUN apk add --no-cache \
3739
ca-certificates \
38-
&& rm -rf /var/lib/apt/lists/*
40+
wget
3941

4042
# Copy binary from builder
4143
COPY --from=builder /build/target/release/universal-connector-server /usr/local/bin/
4244

4345
# Copy web UI (optional, for serving static files)
4446
COPY web /app/web
4547

46-
# Create non-root user
47-
RUN useradd -m -u 1000 connector && \
48+
# Create non-root user (wolfi uses adduser)
49+
RUN adduser -D -u 1000 connector && \
4850
chown -R connector:connector /app
4951

5052
USER connector
5153

5254
# Expose ports
5355
EXPOSE 8080 8081
5456

55-
# Health check
57+
# Health check using wget (lighter than curl)
5658
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
57-
CMD ["sh", "-c", "curl -f http://localhost:8080/api/health || exit 1"]
59+
CMD ["sh", "-c", "wget -q --spider http://localhost:8080/api/health || exit 1"]
5860

5961
# Run server
6062
CMD ["universal-connector-server"]

flake.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383

8484
meta = with pkgs.lib; {
8585
description = "LSP-based universal plugin architecture for document conversion";
86-
homepage = "https://github.com/universal-connector/universal-language-connector";
87-
license = with licenses; [ mit ];
86+
homepage = "https://github.com/hyperpolymath/universal-language-server-plugin";
87+
license = with licenses; [ mit agpl3Plus ];
8888
maintainers = [ ];
8989
mainProgram = "universal-connector-server";
9090
};
@@ -107,8 +107,8 @@
107107
rust-analyzer
108108
just
109109
nodejs_20
110-
docker
111-
docker-compose
110+
podman
111+
podman-compose
112112
];
113113

114114
shellHook = ''

0 commit comments

Comments
 (0)