What ways can we use to check a repo for security concerns? #204302
Replies: 4 comments 2 replies
|
I would trust the contractor but still verify the code before moving it into the organization. I would review the required permissions, check the dependencies with tools like npm audit and Dependabot, run static analysis tools such as CodeQL or Semgrep, look for risky functions like eval() or child_process.exec(), test the application in an isolated environment, and enable GitHub security features like secret scanning and branch protection. Since we are not experienced JavaScript developers, I would also recommend having an experienced security engineer review the code before using it. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Dependabot is useful here, but it only answers one part of the question: “are any known vulnerabilities present in the dependency tree?” It does not establish that the application is safe, and publishing the library will not by itself make the review complete. I would use a staged review before forking the repository into the organization:
Before the fork, I would require: a reviewed permission matrix, a clean lockfile-based dependency install, no unresolved high-severity findings, a CI job that runs the scanners on every change, pinned actions, protected branches, and a manual review by someone experienced in application security. Dependabot and SonarQube are good layers, but neither replaces the trust-boundary, runtime-isolation, and CI/repository review above. Useful references: https://docs.github.com/en/code-security/concepts/supply-chain-security/dependabot-alerts |
|
Since the contractor is willing to make the repository public, you actually have more options than just Dependabot. For a public repository, I would use several layers rather than relying on a single scanner:
Since you already have SonarQube, I would run that as another independent layer, but I would not treat SonarQube or Dependabot alone as a complete security review. If I were in your position, my minimum gate before bringing it into the organization would be: Dependabot clean + CodeQL/code scanning clean + secret scan clean + SonarQube review + manual review of permissions/process/network access + sandbox test. Publishing the repository first is actually useful here because several GitHub security features are available to public repositories without requiring you to buy GitHub Code Security. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Question
Body
One of our contractors has written a JavaScript application in a personal repo he has, which helps review other repositories for accessibility concerns, then it generates reports on its findings. This is clearly something that we're interested in. I have worked with him for a couple years and I trust him.
However, anyone can make mistakes. I don't accuse him of anything nefarious. But I want to be as sure as I can, that there's nothing in his code which would introduce any risks for us. I am, at best, an advanced beginner JavaScript developer. The other GitHub Administrator coworker isn't much better. Neither of us feels up to the task of reviewing the contractor's JavaScript code for any security issues. The contractor would like to have his repo forked into one of our GitHub organizations. He added me as a collaborator to his personal repo. I've looked at the code, which to my limited JavaScript experience looks OK, but again, I am cautious.
So, I'm wondering what other things can we do to review his repo for any security risks?
All reactions