C# Files need to be UTF-8#58
Conversation
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
| csharpFile is string filePath && | ||
| FileSystem.Instance.File.Exists(filePath)) | ||
| { | ||
| string tempPath = Path.GetTempFileName(); |
Check failure
Code scanning / SonarCloud
Insecure temporary file creation methods should not be used
|
|
Waiting on SkylineCommunications/Skyline.DataMiner.CICD.FileSystem#22 to finish |
PedroDebevere
left a comment
There was a problem hiding this comment.
- see SonarCloud remark on Path.GetTempFileName() use
- Would using the Parsers package to parse the cs files in the projects be a better alternative? (to be verified if that supports shared projects).
- Is the encoding check for the protocol XML file itself also going to become a validator check?
SonarCloud has been fixed before, but the UI on GitHub doesn't want to update that somehow. |
|
Validator check for the protocol xml file itself won't be possible without breaking changes. Currently there is no way to know the filepath of the xml file as we only receive the content. As in DIS there is already an info banner that deals with this, I would not include this in this PR. If needed a new task can be made for this breaking change. |



New Error Message
[3.40.1] InvalidFileEncoding
All files are read out as UTF-8 throughout the CI/CD process. If QActions would contain files that are not UTF-8 due to special characters, it could be converted to invalid characters and break your code.