Skip to content

extractAccessKey method exposes secrets in debug mode #60

Open
@heurtematte

Description

@heurtematte

Setting script to debug mode exposes secrets in logs.

  script:
    - set -x
    - !reference [.injectDevelocityForMaven]

Root cause:

  • method extractAccessKey
 key="${allKeys#*$hostname=}"    # Remove everything before the host name and '='

Avoid string manipulation with secrets.

Logs:

++ extractAccessKey [MASKED] develocity-staging.eclipse.org
+++ local allKeys=[MASKED]
+++ local hostname=develocity-staging.eclipse.org
+++ key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+++ '[' XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX == [MASKED] ']'
+++ key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX is exposed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions