最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

security - How can I append a timestamp to a filename without triggering an OS vulnerability flag in GitLab CICD? - Stack Overfl

programmeradmin3浏览0评论

I'm trying to generate a filename in my C# application with a timestamp for file versioning, like this:

FileName = $"Professional_{DateTime.UtcNow.ToString("yyyy-MM-dd_HH-mm-ss")}.csv";

Even though the timestamp format contains valid characters only, GitLab still flags it as an OS injection vulnerability in the CI/CD pipeline. I removed the timestamp and reran the pipeline, and GitLab no longer flagged it as vulnerable to OS injection. However, the timestamp is a requirement and I cannot remove it.

How can I generate the timestamp and append it to the filename in a way that avoids triggering the OS vulnerability flag in GitLab while preserving the exact timestamp format?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论