Skip to content

Commit

Permalink
Merge branch 'main' into ui-gcp-account-rename
Browse files Browse the repository at this point in the history
  • Loading branch information
milan-deepfence committed Jun 27, 2024
2 parents fabfacf + ec05de3 commit 0b9bcc6
Show file tree
Hide file tree
Showing 86 changed files with 1,240 additions and 881 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export IMAGE_REPOSITORY?=quay.io/deepfenceio
export DF_IMG_TAG?=latest
export STEAMPIPE_IMG_TAG?=0.20.x
export IS_DEV_BUILD?=false
export VERSION?=v2.2.1
export VERSION?=v2.3.0
export AGENT_BINARY_BUILD=$(DEEPFENCE_FARGATE_DIR)/build
export AGENT_BINARY_BUILD_RELATIVE=deepfence_agent/agent-binary/build
export AGENT_BINARY_DIST=$(DEEPFENCE_FARGATE_DIR)/dist
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ docker run -dit \
-e MGMT_CONSOLE_URL="---CONSOLE-IP---" \
-e MGMT_CONSOLE_PORT="443" \
-e DEEPFENCE_KEY="---DEEPFENCE-API-KEY---" \
quay.io/deepfenceio/deepfence_agent_ce:2.2.1
quay.io/deepfenceio/deepfence_agent_ce:2.3.0
```

Note: Image tag `quay.io/deepfenceio/deepfence_agent_ce:2.2.1-multiarch` is supported in amd64 and arm64/v8 architectures.
Note: Image tag `quay.io/deepfenceio/deepfence_agent_ce:2.3.0-multiarch` is supported in amd64 and arm64/v8 architectures.

On a Kubernetes platform, the sensors are installed using [helm chart](https://community.deepfence.io/threatmapper/docs/v2.2/sensors/kubernetes/)

Expand Down
2 changes: 1 addition & 1 deletion deepfence_agent/plugins/YaraHunter
2 changes: 1 addition & 1 deletion deepfence_agent/plugins/yara-rules
Submodule yara-rules updated 2 files
+1 −1 build-timestamp
+0 −12 malware.yar
2 changes: 1 addition & 1 deletion deepfence_bootstrapper/assets/config-cloud.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ autostart=true
autorestart=true

[process:cloud_scanner]
command=sudo -E -u deepfence /bin/bash -c "rm -f /tmp/cloud-scanner.sock && $DF_INSTALL_DIR/bin/cloud_scanner -socket-path /tmp/cloud-scanner.sock"
command=sudo -E -u deepfence /bin/bash -c "rm -f /tmp/cloud-scanner.sock && HOME=/home/deepfence HOME_DIR=/home/deepfence USER=deepfence $DF_INSTALL_DIR/bin/cloud_scanner -socket-path /tmp/cloud-scanner.sock"
path=$DF_INSTALL_DIR/bin/cloud_scanner
autostart=true
autorestart=true
2 changes: 2 additions & 0 deletions deepfence_bootstrapper/controls/controls.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ func SetCloudScannerControls() {
return SendAgentDiagnosticLogs(req,
[]string{dfUtils.GetDfInstallDir() + "/var/log/supervisor",
dfUtils.GetDfInstallDir() + "/var/log/fenced/cloud-scanner-log",
dfUtils.GetDfInstallDir() + "/var/log/fenced/cloud-resource-refresh-log",
dfUtils.GetDfInstallDir() + "/var/log/fenced/status",
dfUtils.GetDfInstallDir() + "/var/log/deepfenced",
dfUtils.GetDfInstallDir() + "/.steampipe/logs"},
[]string{})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const Tags = ({
setSelectedTag,
scanType,
}: {
selectedTag: ImageTagType;
setSelectedTag: React.Dispatch<React.SetStateAction<ImageTagType>>;
selectedTag: ImageTagType | null;
setSelectedTag: React.Dispatch<React.SetStateAction<ImageTagType | null>>;
scanType: ScanTypeEnum;
}) => {
const dockerImageName = useScanResults({
Expand Down Expand Up @@ -73,7 +73,7 @@ const InputForm = ({
toScanData: ToScanDataType;
setToScanData: React.Dispatch<React.SetStateAction<ToScanDataType>>;
}) => {
const [selectedTag, setSelectedTag] = useState<ImageTagType>({
const [selectedTag, setSelectedTag] = useState<ImageTagType | null>({
nodeId,
nodeName: '',
tagList: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { ScanTypeEnum } from '@/types/common';

export type Props = {
scanType: ScanTypeEnum | 'none';
onChange?: (value: ImageTagType) => void;
onChange?: (value: ImageTagType | null) => void;
onClearAll?: () => void;
defaultSelectedTag?: ImageTagType;
defaultSelectedTag?: ImageTagType | null;
valueKey?: 'nodeId' | 'nodeName';
active?: boolean;
triggerVariant?: 'select' | 'button';
Expand All @@ -35,16 +35,16 @@ const SearchableTag = ({
filter,
}: Props) => {
const [searchText, setSearchText] = useState('');
const [selectedTag, setSelectedTag] = useState<ImageTagType | undefined>(() => {
return defaultSelectedTag;
const [selectedTag, setSelectedTag] = useState<ImageTagType | null>(() => {
return defaultSelectedTag ?? null;
});

const isSelectVariantType = useMemo(() => {
return triggerVariant === 'select';
}, [triggerVariant]);

useEffect(() => {
setSelectedTag(defaultSelectedTag ?? undefined);
setSelectedTag(defaultSelectedTag ?? null);
}, [defaultSelectedTag]);

const { data, isFetchingNextPage, hasNextPage, fetchNextPage } =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const scanPostureApiAction = async ({
let nodeType = body._nodeType.toString();
const checkTypes = body._checkTypes.toString()?.split(',') as Array<ModelBenchmarkType>;

const isCloudScan = !isNonCloudNode(nodeType);
const isCloudScan = isCloudOrgNode(nodeType) || isCloudNonOrgNode(nodeType);

if (isKubernetesNode(nodeType as ComplianceScanNodeTypeEnum)) {
nodeType = 'cluster';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
getReportBenchmarkList,
getReportNodeType,
} from '@/features/integrations/pages/DownloadReport';
import { getBenchmarkPrettyName } from '@/utils/enum';

export const CloudComplianceForm = ({
setProvider,
Expand Down Expand Up @@ -77,7 +78,7 @@ export const CloudComplianceForm = ({
{getReportBenchmarkList(provider)?.map((provider) => {
return (
<ListboxOption value={provider} key={provider}>
{provider}
{getBenchmarkPrettyName(provider)}
</ListboxOption>
);
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
getReportBenchmarkList,
getReportNodeType,
} from '@/features/integrations/pages/DownloadReport';
import { getBenchmarkPrettyName } from '@/utils/enum';

const getDisplayNodeTypeValue = (resource: string, nodeType: string) => {
if (resource === UtilsReportFiltersScanTypeEnum.CloudCompliance) {
Expand Down Expand Up @@ -76,7 +77,7 @@ export const ComplianceForm = ({
{getReportBenchmarkList(provider)?.map((provider) => {
return (
<ListboxOption value={provider} key={provider}>
{provider}
{getBenchmarkPrettyName(provider)}
</ListboxOption>
);
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ const Filters = () => {
</Combobox>
<Combobox
value={searchParams.get('malwareScanStatus')}
nullable
onQueryChange={(query) => {
setMalwareScanStatusSearchText(query);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ const Filters = () => {
</Combobox>
<Combobox
value={searchParams.get('complianceScanStatus')}
nullable
onQueryChange={(query) => {
setComplianceScanStatusSearchText(query);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ const Filters = () => {
<div className="flex gap-2">
<Combobox
value={searchParams.get('vulnerabilityScanStatus')}
nullable
onQueryChange={(query) => {
setVulnerabilityScanStatusSearchText(query);
}}
Expand Down Expand Up @@ -279,7 +278,6 @@ const Filters = () => {
</Combobox>
<Combobox
value={searchParams.get('secretScanStatus')}
nullable
onQueryChange={(query) => {
setSecretScanStatusSearchText(query);
}}
Expand Down Expand Up @@ -313,7 +311,6 @@ const Filters = () => {
</Combobox>
<Combobox
value={searchParams.get('malwareScanStatus')}
nullable
onQueryChange={(query) => {
setMalwareScanStatusSearchText(query);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ const Filters = () => {
</Combobox>
<Combobox
value={searchParams.get('secretScanStatus')}
nullable
onQueryChange={(query) => {
setSecretScanStatusSearchText(query);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const Filters = () => {
value={THREAT_TYPES.find((threatType) => {
return threatType.value === searchParams.get('type');
})}
nullable
onQueryChange={(query) => {
setThreatTypeSearchText(query);
}}
Expand Down Expand Up @@ -190,7 +189,6 @@ const Filters = () => {
value={THREAT_GRAPH_SCOPE.find((scope) => {
return scope.value === searchParams.get('cloud_resource_only');
})}
nullable
onQueryChange={(query) => {
setScopeSearchText(query);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ function SearchableServiceType() {
return (
<Combobox
value={selected}
nullable
multiple
onEndReached={onEndReached}
startIcon={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ function Filters() {
/>
<Combobox
value={searchParams.get('vulnerabilityScanStatus')}
nullable
onQueryChange={(query) => {
setVulnerabilityScanStatusSearchText(query);
}}
Expand Down Expand Up @@ -315,7 +314,6 @@ function Filters() {
</Combobox>
<Combobox
value={searchParams.get('secretScanStatus')}
nullable
onQueryChange={(query) => {
setSecretScanStatusSearchText(query);
}}
Expand Down Expand Up @@ -352,7 +350,6 @@ function Filters() {
</Combobox>
<Combobox
value={searchParams.get('malwareScanStatus')}
nullable
onQueryChange={(query) => {
setMalwareScanStatusSearchText(query);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ function Filters() {
/>
<Combobox
value={searchParams.get('vulnerabilityScanStatus')}
nullable
onQueryChange={(query) => {
setVulnerabilityScanStatusSearchText(query);
}}
Expand Down Expand Up @@ -352,7 +351,6 @@ function Filters() {
</Combobox>
<Combobox
value={searchParams.get('secretScanStatus')}
nullable
onQueryChange={(query) => {
setSecretScanStatusSearchText(query);
}}
Expand Down Expand Up @@ -389,7 +387,6 @@ function Filters() {
</Combobox>
<Combobox
value={searchParams.get('malwareScanStatus')}
nullable
onQueryChange={(query) => {
setMalwareScanStatusSearchText(query);
}}
Expand Down Expand Up @@ -426,7 +423,6 @@ function Filters() {
</Combobox>
<Combobox
value={searchParams.get('complianceScanStatus')}
nullable
onQueryChange={(query) => {
setComplianceScanStatusSearchText(query);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ function Filters() {
value={KUBERNETES_STATUSES.find((status) => {
return status.value === searchParams.get('kubernetesStatus');
})}
nullable
onQueryChange={(query) => {
setKubernetesStatusSearchText(query);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,6 @@ const Filters = () => {
</Combobox>
<Combobox
value={searchParams.get('vulnerabilityScanStatus')}
nullable
onQueryChange={(query) => {
setVulnerabilityScanStatusSearchText(query);
}}
Expand Down
2 changes: 1 addition & 1 deletion deepfence_frontend/packages/ui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"coverage": "vitest run --coverage"
},
"dependencies": {
"@headlessui/react": "^1.7.18",
"@headlessui/react": "^2.1.0",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5",
Expand Down
Loading

0 comments on commit 0b9bcc6

Please sign in to comment.