The Simplest Way to Make GitLab CI and Windows Server Core Work Like They Should
Teams use gitlab ci and windows server core to build and test Windows apps. The pipeline sends jobs to lightweight Windows containers or hosts to run scripts. This setup removes the graphical interface and cuts down system resource use. Build jobs start faster and use less disk space on the host machine. Teams can run automated tests, compile code, and ship packages on every commit. How gitlab ci and windows server core share data and roles The pipeline server talks to an agent installed on
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams use gitlab ci and windows server core to build and test Windows apps. The pipeline sends jobs to lightweight Windows containers or hosts to run scripts.
This setup removes the graphical interface and cuts down system resource use. Build jobs start faster and use less disk space on the host machine. Teams can run automated tests, compile code, and ship packages on every commit.
How gitlab ci and windows server core share data and roles
The pipeline server talks to an agent installed on the Windows host. This agent polls the central server over HTTPS to check for new jobs. When a job starts, the server sends a temporary job token down. The agent uses this token to pull source code and build tools.
Next, the agent starts a fresh container or shell session on the host. It runs the build steps under a specific local Windows user account. After the script finishes, the agent uploads test logs and build files back. The host then cleans up the workspace before the next job runs.
Permissions flow from the project settings down to the local Windows service account. If the local service runs as a system admin, every job gets admin rights. Good setups match the pipeline role to a locked down local Windows user. This keeps one bad script from breaking the whole build host.
Common failure modes and how to scope roles
Many teams run the build agent under the main local system account. This choice gives every developer script full control over the Windows host. A single pipeline job can read secrets left behind by other teams. Shared service accounts also make it hard to see who ran a command.
Broad network paths create another big risk for build servers. Build agents often sit inside the core network to reach internal databases. If an attacker changes a build script, they can scan internal servers. Unlogged queries from build jobs can also leak test data like emails or phone numbers.
GitLab CI Security + Kubernetes API Server Access: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix this, run the agent inside isolated containers for every single job. Create a dedicated local Windows user with rights to only one work folder. Block the build host from talking to production networks by default. Open network paths only to the package stores and code servers needed.
Managing secrets and logs across Windows build hosts
Build scripts often need keys to push packages or run database checks. Storing static keys in project variables leaves them open to anyone with write rights. A developer can print those keys to the build log by mistake. Instead, pass short lived keys to each job and wipe the disk after.
Windows hosts also hold event logs that stay on the local disk. When a container stops, those local system logs disappear right away. Forward host and container logs to a central log server in real time. Mask sensitive fields like card numbers or national IDs when writing log results.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
Why do my Windows containers fail to start on the build host?
Windows container images must match the exact kernel version of the host system. Check that your build image tag matches the host Windows Server Core release.
Should I use the shell executor or container executor on Windows?
Use the container executor for most builds to keep jobs clean and isolated. Use the shell executor only when tools cannot run inside a container.
How do I stop build jobs from filling up the host disk?
Set up a scheduled task on the host to delete old container images. Clear out old build caches and temp folders at the end of each day.
Related guides
In this post