Skip to content

make sure target name in targets.yaml file doesn't include any characters that can alter the output location#333

Merged
harp-intel merged 4 commits into
mainfrom
sanitizetargetname
May 7, 2025
Merged

make sure target name in targets.yaml file doesn't include any characters that can alter the output location#333
harp-intel merged 4 commits into
mainfrom
sanitizetargetname

Conversation

@harp-intel
Copy link
Copy Markdown
Contributor

No description provided.

…ters that can alter the output location

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel requested a review from Copilot May 6, 2025 21:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a function to sanitize target names read from targets.yaml to prevent characters that may alter output locations.

  • Introduces a new sanitizeTargetName function to restrict allowed characters in a target name
  • Updates the instantiation of remote targets to use the sanitized target name

Comment thread internal/common/targets.go
harp-intel added 3 commits May 6, 2025 14:05
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
…ization

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel merged commit f9b68ef into main May 7, 2025
4 checks passed
@harp-intel harp-intel deleted the sanitizetargetname branch May 7, 2025 20:37
echiugoog pushed a commit to echiugoog/PerfSpect that referenced this pull request May 21, 2025
…ters that can alter the output location (intel#333)

* make sure target name in targets.yaml file doesn't include any characters that can alter the output location

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>

* update comment

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>

* Enhance target name sanitization to prevent duplicates in targets file

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>

* Add unit tests for sanitizeTargetName function to validate name sanitization

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>

---------

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants