Skip to content

Commit

Permalink
feat: vulnrichment params (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
genos1998 authored Dec 4, 2024
1 parent aa27036 commit 4153eff
Show file tree
Hide file tree
Showing 8 changed files with 7,104 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/schemaHelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const (
August2024Version2
September2024Version
October2024Version
November2024Version
)

var SchemasString = map[SchemaOrder]string{
Expand All @@ -28,6 +29,7 @@ var SchemasString = map[SchemaOrder]string{
August2024Version2: schemas.August2024Version2,
September2024Version: schemas.September2024Schema,
October2024Version: schemas.October2024Schema,
November2024Version: schemas.November2024Schema,
}

var schemaOrderMap = map[string]SchemaOrder{
Expand All @@ -39,6 +41,7 @@ var schemaOrderMap = map[string]SchemaOrder{
"August2024V2": August2024Version2,
"September2024": September2024Version,
"October2024": October2024Version,
"November2024": November2024Version,
}

var expDgraphSchemaMap = map[int]bool{
Expand All @@ -50,6 +53,7 @@ var expDgraphSchemaMap = map[int]bool{
August2024Version2.Int(): false,
September2024Version.Int(): false,
October2024Version.Int(): false,
November2024Version.Int(): false,
}

func (e SchemaOrder) NameOfSchema() string {
Expand Down
5 changes: 5 additions & 0 deletions common/upgradeSteps.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"upgradationScript/july2024august2024"
"upgradationScript/june2024june2024v2"
"upgradationScript/june2024v2july2024"
"upgradationScript/october2024november2024"
"upgradationScript/september2024october2024"

"upgradationScript/logger"
Expand Down Expand Up @@ -163,6 +164,10 @@ func beginProcessOfUpgrade(upgradeTo SchemaOrder, isSecondDgraphRequired, isLast

return september2024october2024.UpgradeToOctober2024(Conf.ProdGraphQLAddr, Conf.ProdDgraphToken, "", prodGraphqlClient)

case November2024Version:

return october2024november2024.UpgradeToNovember2024(Conf.ProdGraphQLAddr, Conf.ProdDgraphToken, "", prodGraphqlClient)

}

logger.Sl.Debugf("no upgrade steps for %s", upgradeTo.NameOfSchema())
Expand Down
17 changes: 17 additions & 0 deletions october2024november2024/genqlient.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
schema: schema.graphql
operations:
- queries.graphql
generated: schema-generated.go
package: october2024november2024
use_struct_references: true
bindings:
Boolean:
type: "*bool"
DateTime:
type: "*time.Time"
Int64:
type: int64
Int:
type: "*int"
ID:
type: "*string"
10 changes: 10 additions & 0 deletions october2024november2024/queries.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
mutation defaultVulnrichmentParams {
updateVulnerability(
input: {
set: { exploitation: "", automatable: "", technicalImpact: "" }
filter: { has: id }
}
) {
numUids
}
}
60 changes: 60 additions & 0 deletions october2024november2024/schema-generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4153eff

Please sign in to comment.