Circle CI Store Artifacts

Published
Length
3 min read

Luis Felipe Dias

All posts

To use circle ci store artifacts, you define a storage step in your build pipeline. This step uploads chosen files from the job container to long-term storage after a run. Engineering teams often set up this step to save test reports, logs, and app binaries. Still, broad permissions can expose sensitive data inside those saved files to the whole team. If a build script dumps raw outputs, anyone with project read rights can download them. How circle ci store artifacts works in a build pipeline

GitLab CI Security: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

To use circle ci store artifacts, you define a storage step in your build pipeline. This step uploads chosen files from the job container to long-term storage after a run. Engineering teams often set up this step to save test reports, logs, and app binaries. Still, broad permissions can expose sensitive data inside those saved files to the whole team. If a build script dumps raw outputs, anyone with project read rights can download them.

How circle ci store artifacts works in a build pipeline

Every build job runs inside an isolated container or virtual machine with temporary disk space. When the job ends, the platform wipes that machine and deletes all local files. The artifact storage step lets you keep important files after the container shuts down. You tell the pipeline which folder or file path to save at the end. You can also set a destination label to organize the uploaded files by type.

The build agent reads the local path and sends the files to object storage. Once the upload finishes, the platform links those files to the specific job run. Users who log in to the dashboard can view and download the saved outputs. Teams can also fetch these files through the platform API using a personal token. This workflow helps developers check broken tests, read crash logs, and grab compiled app packages.

What native artifact storage solves and where gaps remain

Native artifact storage solves the problem of lost build data in temporary job containers. It gives teams a central place to check test coverage results and binary files. Project permissions control which users can log in and download files from the build history. Still, project roles only check who can view the pipeline, not what the pipeline writes. A job often connects to live databases or internal systems to run integration tests.

If a test fails, the runner might dump full database responses into a log file. That log file then uploads to artifact storage with real customer emails or card numbers. Static keys stored in the project settings also let scripts run any query without limits. The platform saves whatever files exist in the target folder without checking their contents first. To prevent data leaks, teams must control database queries and mask sensitive fields before storage.

GitLab CI Security: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Securing build data and runtime commands

Safe artifact management starts before the build agent uploads a single file to storage. Teams should separate build logs from sensitive test data during every pipeline run. Never write full API responses or raw database rows to the local artifact folder. Instead, limit what the build runner can fetch from your backend systems during tests.

When a job queries a database, runtime rules should rewrite sensitive fields in the results. For example, masking can replace emails, phone numbers, and national IDs with safe placeholder text. Even if a crash log gets saved as an artifact, the sensitive fields stay masked. You should also remove long-lived database keys from your pipeline settings to reduce risk. Controlling each command in flight stops bad queries before they create risky output files.

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

What is the difference between workspaces and stored artifacts?

Workspaces pass files between jobs during a single workflow run. Stored artifacts keep files after the whole workflow finishes so users can download them later.

Who can download files saved by a build job?

Anyone with read permissions on the linked source code repo can view and download artifacts. Public projects allow any logged-in user to read the saved build outputs.

How can teams stop sensitive data from leaking into build artifacts?

Teams should avoid printing raw variables or database rows to log files during tests. Using runtime data masking also rewrites emails and card numbers before logs hit the disk.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.