Skip to content

Commit

Permalink
Merge branch 'main' into release-2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ramanan-ravi committed Jan 30, 2025
2 parents d5826a0 + f6721e4 commit 0a4623f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
12 changes: 6 additions & 6 deletions deepfence_server/reporters/scan/scan_reporters.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ func GetCloudAccountIDs(ctx context.Context, cloudProviderIds []model.NodeIdenti
if len(orgNodeIds) > 0 {
nres, err = tx.Run(ctx, `
MATCH (n:CloudNode) -[:IS_CHILD] -> (m)
WHERE n.node_id IN $node_ids
WHERE n.node_id IN $node_ids
AND NOT m.node_id IN $child_node_ids
`+reporters.ParseFieldFilters2CypherWhereConditions(`m`, filterClauses, false)+`
RETURN m.node_id`,
Expand Down Expand Up @@ -542,14 +542,14 @@ func GetScansList(ctx context.Context, scanType utils.Neo4jScanType, nodeIDs []m
AND (` + strings.Join(nodeTypesStr, " OR ") + `)
` + reporters.ParseFieldFilters2CypherWhereConditions("m", mo.Some(ff), false) + `
` + orderFilter + `
RETURN m.node_id, m.status, m.status_message, m.created_at, m.updated_at, n.node_id, n.node_name, labels(n) as node_type
RETURN m.node_id, m.status, m.status_message, m.created_at, m.updated_at, n.node_id, COALESCE(n.node_name, ""), labels(n) as node_type
` + fw.FetchWindow2CypherQuery()
} else {
query = `
MATCH (m:` + string(scanType) + `) -[:SCANNED]-> (n)
` + reporters.ParseFieldFilters2CypherWhereConditions("m", mo.Some(ff), true) + `
` + orderFilter + `
RETURN m.node_id, m.status, m.status_message, m.created_at, m.updated_at, n.node_id, n.node_name, labels(n) as node_type
RETURN m.node_id, m.status, m.status_message, m.created_at, m.updated_at, n.node_id, COALESCE(n.node_name, ""), labels(n) as node_type
` + fw.FetchWindow2CypherQuery()
}
scansInfo, err = processScansListQuery(ctx, query, nodeIDsStr, tx)
Expand Down Expand Up @@ -656,8 +656,8 @@ func GetScanResultDiff[T any](ctx context.Context, scanType utils.Neo4jScanType,
OPTIONAL MATCH (c:ContainerImage{node_id: f.docker_image_id}) -[:ALIAS] ->(t) -[ma:MASKED]-> (d)
OPTIONAL MATCH (cb:ContainerImage{node_id: n.docker_image_id}) -[:IS] ->(is) -[mis:MASKED]-> (d)
WITH e, d, r, collect(ma) as ma_list, collect(mis) as mis_list
WITH apoc.map.merge( e{.*},
d{.*, masked: coalesce(d.masked or r.masked or e.masked or head(ma_list).masked or head(mis_list).masked, false),
WITH apoc.map.merge( e{.*},
d{.*, masked: coalesce(d.masked or r.masked or e.masked or head(ma_list).masked or head(mis_list).masked, false),
name: coalesce(e.name, d.name, '')}) AS merged_data` +
reporters.ParseFieldFilters2CypherWhereConditions("d", mo.Some(ff), true) +
ffCondition + ` RETURN merged_data ` +
Expand Down Expand Up @@ -749,7 +749,7 @@ func GetScanResults[T any](ctx context.Context, scanType utils.Neo4jScanType, sc
WITH d, n, e, r, m
OPTIONAL MATCH (cb:ContainerImage{node_id: n.docker_image_id}) -[:IS] ->(is) -[mis:MASKED]-> (d)
WITH apoc.map.merge( e{.*},
d{.*, masked: coalesce(d.masked or r.masked or e.masked
d{.*, masked: coalesce(d.masked or r.masked or e.masked
or m.masked or mis.masked, false),
name: coalesce(e.name, d.name, '')}) as d` +
reporters.ParseFieldFilters2CypherWhereConditions("d", mo.Some(ff), true) +
Expand Down
2 changes: 1 addition & 1 deletion deepfence_server/reporters/search/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ func searchGenericScanInfoReport(ctx context.Context, scanType utils.Neo4jScanTy
ORDER BY n.updated_at DESC` +
scanFilter.Window.FetchWindow2CypherQuery() +
`}` +
` RETURN n.node_id as scan_id, n.status as status, n.status_message as status_message, n.created_at as created_at, n.updated_at as updated_at, m.node_id as node_id, COALESCE(m.node_type, m.cloud_provider) as node_type, m.node_name as node_name` +
` RETURN n.node_id as scan_id, n.status as status, n.status_message as status_message, n.created_at as created_at, n.updated_at as updated_at, m.node_id as node_id, COALESCE(m.node_type, m.cloud_provider) as node_type, COALESCE(m.node_name,"") as node_name` +
reporters.OrderFilter2CypherCondition("", scanFilter.Filters.OrderFilter, nil) +
fw.FetchWindow2CypherQuery()
log.Debug().Msgf("search query: %v", query)
Expand Down
24 changes: 12 additions & 12 deletions docs/vulnerability_feeds/listing.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@
],
"5": [
{
"built": "2025-01-21T01:33:41.039532933Z",
"built": "2025-01-28T13:10:11.493605827Z",
"version": 5,
"url": "https://threat-intel.deepfence.io/vulnerability-db/releases/download/threatintel-vuln-v5-2025-01-21_01-29-42/threatintel-vuln-v5-2025-01-21_01-29-42.tar.gz",
"checksum": "cde2bbb843503dca4b916090b4cccfeae6a9b60c10184431caf236d26604c362"
"url": "https://threat-intel.deepfence.io/vulnerability-db/releases/download/threatintel-vuln-v5-2025-01-28_13-05-59/threatintel-vuln-v5-2025-01-28_13-05-59.tar.gz",
"checksum": "65003a2ae6898303f8fc838adf1ac949642e0edec30503f21cebe97d75e56cd7"
},
{
"built": "2025-01-21T13:11:47.838983787Z",
"built": "2025-01-29T01:33:51.726957518Z",
"version": 5,
"url": "https://threat-intel.deepfence.io/vulnerability-db/releases/download/threatintel-vuln-v5-2025-01-21_13-06-34/threatintel-vuln-v5-2025-01-21_13-06-34.tar.gz",
"checksum": "a04aa5e6e6cc576a11b8232247e76c765a831456dbf1d4d551ba38304b1da1d0"
"url": "https://threat-intel.deepfence.io/vulnerability-db/releases/download/threatintel-vuln-v5-2025-01-29_01-29-47/threatintel-vuln-v5-2025-01-29_01-29-47.tar.gz",
"checksum": "c1ae907dbbe87ee0807c5d7b3659362df821e4cd90fd657e25b5f999c21fbe0d"
},
{
"built": "2025-01-22T01:33:59.081080016Z",
"built": "2025-01-29T13:10:32.170786994Z",
"version": 5,
"url": "https://threat-intel.deepfence.io/vulnerability-db/releases/download/threatintel-vuln-v5-2025-01-22_01-29-56/threatintel-vuln-v5-2025-01-22_01-29-56.tar.gz",
"checksum": "c50be36d093e6c41a14373f631b66947612a20fbfd2d19559aab767891914b25"
"url": "https://threat-intel.deepfence.io/vulnerability-db/releases/download/threatintel-vuln-v5-2025-01-29_13-06-31/threatintel-vuln-v5-2025-01-29_13-06-31.tar.gz",
"checksum": "d6d67a070ba7c49df41c9b715aa2b3f5ef8bb75d8eace1f077f0ee32ed0e6331"
},
{
"built": "2025-01-22T13:10:44.579033503Z",
"built": "2025-01-30T01:33:34.610753171Z",
"version": 5,
"url": "https://threat-intel.deepfence.io/vulnerability-db/releases/download/threatintel-vuln-v5-2025-01-22_13-06-32/threatintel-vuln-v5-2025-01-22_13-06-32.tar.gz",
"checksum": "00fc6b1beaa119cd802ac0e4396bf4528ac6e830b2c2eb345acbc21e40acaec0"
"url": "https://threat-intel.deepfence.io/vulnerability-db/releases/download/threatintel-vuln-v5-2025-01-30_01-29-33/threatintel-vuln-v5-2025-01-30_01-29-33.tar.gz",
"checksum": "238bb7a08e1fb64e351378a41ccdd8818e46beed7a264deae2ab85b7e850d94b"
}
]
}
Expand Down

0 comments on commit 0a4623f

Please sign in to comment.