-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
knock #2338
base: develop
Are you sure you want to change the base?
knock #2338
Conversation
@mlodic is there a way to safelt remove the file generated after the scan. I'm not able to find a way to specify the directory where the file is being written to. It is by default being saved in the project's main directory. |
there's the json option as output, have you tried it? |
files = glob.glob("domain.com*.json") | ||
for file in files: | ||
logger.info(f"Removing {file}") | ||
os.remove(file) |
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.
There is a possibility to save the results only in memory?
I hate to have to save data in files, read them again, and delete.
It is a really bad pattern
Okay, i read the knockpy module again, the way i have written the code shouldn't exactly produce any file. I just ran the analyzer after deleting the file and it seems to work now. No file is being produced so deleting it is no more a problem anymore. My bad for the incontinence caused! pushing the commit |
will add playbook migration in a while |
playbook migration could be avoided cause this is a scanner and we don't want people to accidentally execute it against sites |
the tests always timeout. maybe because the value is set to be 20s max and knock analyzer takes a lot of time to process. |
…into Knock#1418
Mmmh, I do not like to increase the timeout because the CI is already slow as fuck, but I don't see other way then to increase it, if we do not want to mock it up. timeout_seconds = min(timeout_seconds, 30) to timeout_seconds = max(timeout_seconds, 30) And then change the plugin |
Why don't we try and mock it up as 600s would be a lot? How is that supposed to function? |
I don't get the first question. As for the CI, unfortunately we don't have the time to improve it. You can always run the single tests that is failing in your local environment, and check the result before uploading it. |
Understood! |
even putting t/o for 600s didn't get the job done. i think its better to mock response in the test or something else... I can't seem to get that done as well. |
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.
doesn't the mock work yet?
api_app/analyzers_manager/migrations/0091_analyzer_config_knock.py
Outdated
Show resolved
Hide resolved
api_app/analyzers_manager/migrations/0091_analyzer_config_knock.py
Outdated
Show resolved
Hide resolved
I'll have to look into the mocking function carefully, something is wrong there... |
…into Knock#1418
I don't want to ruin the party cause the analyzer is ok but this line is not
We noticed that this thing would force IntelOwl to rebuild again and again the package every time either a CI action is triggered or you are rebuilding locally that package. I know the authors of those tools and I have just contacted them about solving this issue. |
😭😭 |
ref: guelfoweb/knock#148 |
I am in contact with the author, at end of June will get back to me for the release of an official version. If we don't get it in time, we would need to fork it and create our own package |
fixes #1418
Description
Please include a summary of the change and link to the related issue.
Type of change
Please delete options that are not relevant.
Checklist
develop
dumpplugin
command and added it in the project as a data migration. ("How to share a plugin with the community")test_files.zip
and you added the default tests for that mimetype in test_classes.py.FREE_TO_USE_ANALYZERS
playbook by following this guide.url
that contains this information. This is required for Health Checks._monkeypatch()
was used in its class to apply the necessary decorators.MockUpResponse
of the_monkeypatch()
method. This serves us to provide a valid sample for testing.Black
,Flake
,Isort
) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.tests
folder). All the tests (new and old ones) gave 0 errors.DeepSource
,Django Doctors
or other third-party linters have triggered any alerts during the CI checks, I have solved those alerts.Important Rules
{
"marcia.domain.com": ["66.96.162.92"],
"http": [404, None, "Apache"],
"https": [None, None, None],
"cert": [None, None],
},
{
"mbsizer.domain.com": ["66.96.162.92"],
"http": [404, None, "Apache"],
"https": [None, None, None],
"cert": [None, None],
},
{
"malektravel.domain.com": ["66.96.162.92"],
"http": [403, None, "Apache"],
"https": [403, None, "Apache"],
"cert": [True, "2024-10-08"],
},
{
"mchattan01.domain.com": ["66.96.162.92"],
"http": [200, None, "Apache"],
"https": [None, None, None],
"cert": [None, None],
},
{
"martina6marco.domain.com": ["66.96.162.92"],
"http": [500, None, "Apache"],
"https": [None, None, None],
"cert": [None, None],
},
{
"maludomaincom.domain.com": ["66.96.162.92"],
"http": [403, None, "Apache"],
"https": [403, None, "Apache"],
"cert": [True, "2024-10-08"],
},
{
"margaretlion.domain.com": ["66.96.162.92"],
"http": [200, None, "Apache"],
"https": [200, None, "Apache"],
"cert": [True, "2024-10-08"],
},