Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to include a mirror of the ClamAV CVD database #37

Merged
merged 14 commits into from
Dec 5, 2022
Merged

Updates to include a mirror of the ClamAV CVD database #37

merged 14 commits into from
Dec 5, 2022

Conversation

nielm
Copy link
Contributor

@nielm nielm commented Nov 14, 2022

Major update to v2.0 to fix #35

This version maintains a ClamAV database mirror to prevent issues with the ClamAV DN

@nielm nielm requested review from idofl and ferrarimarco November 16, 2022 13:14
@nielm nielm self-assigned this Nov 16, 2022
Copy link
Member

@ferrarimarco ferrarimarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the minor things I spotted (and some are opinions!), I think there's room for two things:

  • Setting up Dependabot
  • Setting up GitHub Action workflow to build this container image

I can help you with both as I have ready-to-use templates and examples of both.

WDYT?

README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
cloudrun-malware-scanner/Dockerfile Outdated Show resolved Hide resolved
cloudrun-malware-scanner/Dockerfile Show resolved Hide resolved
cloudrun-malware-scanner/Dockerfile Show resolved Hide resolved
Comment on lines 88 to +105
app.post('/', async (req, res) => {
// Sanity check required values.
if (!req.body || req.body.kind !== 'storage#object') {
handleErrorResponse(res, 200, `${req.body} is not a GCS Storage Object`);
return;
switch (req.body.kind) {
case 'storage#object':
await handleGcsObject(req, res);
break;
case 'schedule#cvd_update':
await handleCvdUpdate(req, res);
break;
default:
handleErrorResponse(
res,
200,
`${JSON.stringify(req.body)} is not supported` +
'(kind must be storage#object or schedule#cvd_update');
break;
}
});

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [a system command](1), but is not rate-limited.
nielm added 14 commits December 5, 2022 19:56
This requires that config.json is used to specify the configuration,
that a separate bucket is used to store a mirror of the CVD database
and that this bucket is pre-populated before deployment
This requires that config.json is used to specify the configuration,
that a separate bucket is used to store a mirror of the CVD database
and that this bucket is pre-populated before deployment
@nielm nielm merged commit b048121 into GoogleCloudPlatform:main Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

connect ECONNREFUSED 127.0.0.1:3310
2 participants