-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: adding google malware detection #36
Conversation
jsdevel
commented
Aug 28, 2022
•
edited
Loading
edited
- Test ipfs malware sample from google with lookup and evaluate.
0fe2ded
to
1b9c179
Compare
1b9c179
to
e6f4227
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the first iteration @jsdevel
Let's please create a package from the start as previously talked and specified in https://hackmd.io/Y1vEmm9qTBmQU9Wzc3PY2w. Once we hook up tests, KV to store results / KV Locker it will be a bunch of logic that should be isolated. Also, we will want the logs for metrics + trigger badbits mail
For the package, we want a worker quite similar to this one with:
- wrangler.toml
- index.js
- cors.js
- error-handler.js
- env.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the new iteration Joe. Added some initial feedback even though I know this is still WIP 😉
9f4a736
to
c3dd17c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the new iteration. Glad things are shaping up. A couple of general comments I could not have a place to add in review:
- github actions workflow for cid verifier package (can be based on edge-gateway
- CI is having a bad time, looks like pnpm lockfile should be commited? perhaps run on root dir pnpm clean && pnpm i
Also, this is first set of comments and I did not get into the actual code for CID verification. Just all the boilerplate around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra thoughts, we should be good after this. Good job
i saw that error. i checked in the pnpm lock file. i think locally i'm using a later version of pnpm and that's causing it. |
de4735a
to
57a0953
Compare
57a0953
to
cc9b4f3
Compare
cf8bef9
to
5412487
Compare
i'll add a README once the approach is finalized |
export interface EnvInput { | ||
ENV: string; | ||
DEBUG: string; | ||
GOOGLE_EVALUATE_SAFE_CONFIDENCE_LEVELS: Array<string>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i had this in case there were other levels we'd want to configure other than SAFE
packages/cid-verifier/src/index.js
Outdated
.get('/verification', withCorsHeaders(verificationGet)) | ||
.post('/verification', withCorsHeaders(verificationPost)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can go over this in our call
8833a3f
to
3960f33
Compare
export interface EnvInput { | ||
ENV: string; | ||
DEBUG: string; | ||
GOOGLE_EVALUATE_SAFE_CONFIDENCE_LEVELS: Array<string>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I got it thanks, this also needs to go to docs. And added in wrangler toml for other environments
bd6d31c
to
7d51262
Compare
* Moving DENYLIST logic to cid-verifier from edge-gateway
7d51262
to
65a107e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hoping you can get this sample.html test to work.
@@ -101,3 +101,10 @@ test('Gets content with other base encodings', async (t) => { | |||
await response.waitUntil() | |||
t.is(await response.text(), 'Hello dot.storage! 😎') | |||
}) | |||
|
|||
test('Sends HTML files to cid-verifier', async (t) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vasco-santos i'm having trouble getting this to work. can you take a look?
6114aa7
to
f3c6b84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉