Skip to content

artifacts:public is still "valid" syntax, even when flag disabled

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

The artifacts:public keyword is disabled by default, and disabled on .com, but the syntax validation does not flag it as invalid:

  • Screenshot_2023-06-01_at_22.30.54

This gives the false impression that the feature is enabled and working (especially if you edit config files locally and don't get the schema warnings). You might think that artifacts with sensitive information have successfully been made private, when in fact the data is publicly visible.

Example Project

See sample pipeline with invalid syntax that still ran green: https://gitlab.com/gitlab-org/technical-writing-group/marcel-test-project/-/commit/b2e2d1a35848aaf31b0484ede1994f81f7fb6bc9

What is the expected correct behavior?

The syntax validation for this keyword should also be behind the non_public_artifacts feature flag, so that when the flag is disabled, the use of the keyword is not possible.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by 🤖 GitLab Bot 🤖