Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace LGTM with Github Actions #101

Merged
merged 3 commits into from
Nov 7, 2022

Conversation

thomas-bc
Copy link
Collaborator

Originating Project/Creator
Affected Component
Affected Architectures(s) GitHub Actions
Related Issue(s)
Has Unit Tests (y/n)
Builds Without Errors (y/n)
Unit Tests Pass (y/n)
Documentation Included (y/n)

Change Description

Adds a Github Actions workflow that runs the security and quality static code analysis in order to phase LGTM out.

Rationale

lgtm.com will be shut down at the end of the year.

Future Work

Remove the LGTM configuration files once we're ok with phasing it out.

Comments

Results should be viewable once the checks are done. It's currently running all queries from the security-and-quality suite, let me know if we want to filter some categories out.

LeStarch
LeStarch previously approved these changes Nov 7, 2022
Copy link
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

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

The changes look good, however; we might fix the breakages. @thomas-bc do you want to do that in this PR, or a separate one?

@thomas-bc
Copy link
Collaborator Author

I implemented the recommended way of dealing with the Uncontrolled data used in path expression alerts. Let me know what you think. It's using normpath() to normalize the path (i.e. resolve special instructions like ../ etc...) and check that the requested resource is within logdir.

The two Wrong number of arguments in a call alerts seem to be expected in both cases, so we should probably dismiss those alerts. One has the LGTM suppression flag, the other one is a test case testing the raising of an exception.

@LeStarch
Copy link
Collaborator

LeStarch commented Nov 7, 2022

@thomas-bc looks good to me. Can we suppress-by-comment or is there some other way to do it? Regardless, I agree with the proposed path-forward.

Copy link
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

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

@thomas-bc approved!

@LeStarch LeStarch merged commit 0128e9d into nasa:devel Nov 7, 2022
@thomas-bc thomas-bc deleted the workflow/gh-code-scan branch February 29, 2024 21:52
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