Convert rest of the actions

This commit is contained in:
Robert Brignull 2020-08-25 16:19:15 +01:00
parent aac5eb2aea
commit 217483dfd6
59 changed files with 1630 additions and 915 deletions

View file

@ -8,13 +8,25 @@
import javascript
/**
* Although these libraries are designed for use on actions they
* have been deemed safe to use outside of actions as well.
*/
class SafeActionLibs extends string {
SafeActionLibs() {
this = "@actions/http-client" or
this = "@actions/exec"
}
}
/**
* An import from a library that is meant for GitHub Actions and
* we do not want to be using outside of actions.
*/
class ActionsLibImport extends ImportDeclaration {
ActionsLibImport() {
getImportedPath().getValue().matches("@actions/%")
getImportedPath().getValue().matches("@actions/%") and
not getImportedPath().getValue() instanceof SafeActionLibs
}
string getName() {