Skip to content

Commit f364afd

Browse files
committed
Remove Improved URL Masking feature flag
1 parent 0ca84c9 commit f364afd

File tree

5 files changed

+0
-30
lines changed

5 files changed

+0
-30
lines changed

apps/gitlab-runner-helper/main.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"go.uber.org/automaxprocs/maxprocs"
1111

1212
"gitlab.com/gitlab-org/gitlab-runner/common"
13-
"gitlab.com/gitlab-org/gitlab-runner/helpers/featureflags"
1413
"gitlab.com/gitlab-org/gitlab-runner/log"
1514

1615
_ "gitlab.com/gitlab-org/gitlab-runner/commands/helpers"
@@ -48,9 +47,6 @@ func main() {
4847
logrus.Fatalln("Command", command, "not found")
4948
}
5049

51-
if !featureflags.IsOn(logrus.StandardLogger(), os.Getenv(featureflags.UseImprovedURLMasking)) {
52-
log.AddSecretsCleanupLogHook(logrus.StandardLogger())
53-
}
5450
log.ConfigureLogging(app)
5551

5652
if err := app.Run(os.Args); err != nil {

common/buildlogger/build_logger.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"github.com/sirupsen/logrus"
88

99
"gitlab.com/gitlab-org/gitlab-runner/helpers"
10-
url_helpers "gitlab.com/gitlab-org/gitlab-runner/helpers/url"
1110
)
1211

1312
type Trace interface {
@@ -30,10 +29,6 @@ const (
3029
StreamStartingServiceLevel = 15
3130
)
3231

33-
type jobTraceIsMaskingURLParams interface {
34-
IsMaskingURLParams() bool
35-
}
36-
3732
func New(log Trace, entry *logrus.Entry) Logger {
3833
return Logger{
3934
log: log,
@@ -77,10 +72,6 @@ func (e *Logger) sendLog(logger func(args ...interface{}), logPrefix string, arg
7772
// (fmt.Sprintln consistently adds a space between arguments).
7873
logLine := fmt.Sprintln(args...)
7974
logLine = logLine[:len(logLine)-1]
80-
81-
if trace, ok := e.log.(jobTraceIsMaskingURLParams); !ok || !trace.IsMaskingURLParams() {
82-
logLine = url_helpers.ScrubSecrets(logLine)
83-
}
8475
logLine += helpers.ANSI_RESET + "\n"
8576

8677
e.SendRawLog(logPrefix + logLine)

common/buildtest/masking.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"github.com/stretchr/testify/require"
99

1010
"gitlab.com/gitlab-org/gitlab-runner/common"
11-
"gitlab.com/gitlab-org/gitlab-runner/helpers/featureflags"
1211
"gitlab.com/gitlab-org/gitlab-runner/helpers/trace"
1312
)
1413

@@ -30,8 +29,6 @@ func RunBuildWithMasking(t *testing.T, config *common.RunnerConfig, setup BuildS
3029
Runner: config,
3130
}
3231

33-
build.Runner.FeatureFlags = map[string]bool{featureflags.UseImprovedURLMasking: true}
34-
3532
build.Variables = append(
3633
build.Variables,
3734
common.JobVariable{Key: "MASKED_KEY", Value: "MASKED_VALUE", Masked: true},

helpers/featureflags/flags.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const (
2424
EnableJobCleanup string = "FF_ENABLE_JOB_CLEANUP"
2525
KubernetesHonorEntrypoint string = "FF_KUBERNETES_HONOR_ENTRYPOINT"
2626
PosixlyCorrectEscapes string = "FF_POSIXLY_CORRECT_ESCAPES"
27-
UseImprovedURLMasking string = "FF_USE_IMPROVED_URL_MASKING"
2827
ResolveFullTLSChain string = "FF_RESOLVE_FULL_TLS_CHAIN"
2928
DisablePowershellStdin string = "FF_DISABLE_POWERSHELL_STDIN"
3029
UsePodActiveDeadlineSeconds string = "FF_USE_POD_ACTIVE_DEADLINE_SECONDS"
@@ -209,15 +208,6 @@ var flags = []FeatureFlag{
209208
"are used rather than [`bash`-style ANSI-C quoting](https://www.gnu.org/software/bash/manual/html_node/Quoting.html). " +
210209
"This should be enabled if the job environment uses a POSIX-compliant shell.",
211210
},
212-
{
213-
Name: UseImprovedURLMasking,
214-
DefaultValue: false,
215-
Deprecated: false,
216-
Description: "When enabled, any sensitive URL parameters are masked no matter where they appear in the trace " +
217-
"log output. When this is disabled, sensitive URL parameters are only masked in select places and can " +
218-
"[occasionally be revealed](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4625). This feature " +
219-
"flag can only be configured via Runner's config and not from a job.",
220-
},
221211
{
222212
Name: ResolveFullTLSChain,
223213
DefaultValue: false,

network/trace.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,6 @@ func (c *clientJobTrace) setupLogLimit() {
448448
c.buffer.SetLimit(bytesLimit)
449449
}
450450

451-
func (c *clientJobTrace) IsMaskingURLParams() bool {
452-
return c.config.IsFeatureFlagOn(featureflags.UseImprovedURLMasking)
453-
}
454-
455451
func (c *clientJobTrace) SetDebugModeEnabled(isEnabled bool) {
456452
c.debugModeEnabled = isEnabled
457453
}

0 commit comments

Comments
 (0)