Skip to content

Commit 5d209b3

Browse files
authored
Merge pull request GreedyBear-Project#882 from intelowlproject/develop
3.2.0
2 parents f2ff6fb + dafa93b commit 5d209b3

102 files changed

Lines changed: 14487 additions & 33446 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env_template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ COMPOSE_FILE=docker/default.yml:docker/local.override.yml
1313
#COMPOSE_FILE=docker/default.yml:docker/local.override.yml:docker/elasticsearch.yml
1414

1515
# If you want to run a specific version, populate this
16-
# REACT_APP_INTELOWL_VERSION="3.1.0"
16+
# REACT_APP_INTELOWL_VERSION="3.2.0"

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
GreedyBear is handled by the same maintainers of [IntelOwl](https://github.com/intelowlproject/IntelOwl/).
22

3-
So, please refer to the [IntelOwl Contribute file](https://github.com/intelowlproject/IntelOwl/blob/master/CONTRIBUTING.md)
3+
So, please refer to the [IntelOwl Contribute guide](https://intelowlproject.github.io/docs/GreedyBear/Contribute/)

.github/configurations/node_linters/eslint/.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
"es2021": true,
66
"jest": true
77
},
8+
"parser": "@babel/eslint-parser",
89
"extends": [
910
"airbnb", "plugin:jsdoc/recommended", "./eslint-config-certego",
1011
"airbnb/hooks", "./eslint-config-certego-react",
1112
"prettier"
1213
],
1314
"parserOptions": {
14-
"ecmaVersion": "latest"
15+
"ecmaVersion": "latest",
16+
"requireConfigFile": false
1517
},
1618
"ignorePatterns": [
1719
"node_modules/",
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"devDependencies": {
3+
"@babel/eslint-parser": "^7.28.6",
34
"eslint-config-airbnb": "^19.0.4",
4-
"eslint-config-prettier": "^9.0.0",
5-
"eslint-plugin-import": "^2.26.0",
5+
"eslint-config-prettier": "^10.1.8",
6+
"eslint-plugin-import": "^2.32.0",
67
"eslint-plugin-jsdoc": "^46.9.0",
7-
"eslint-plugin-jsx-a11y": "^6.6.1",
8-
"eslint-plugin-react": "^7.31.10",
8+
"eslint-plugin-jsx-a11y": "^6.10.2",
9+
"eslint-plugin-react": "^7.37.5",
910
"eslint-plugin-react-hooks": "^4.6.0"
1011
}
1112
}

.github/pull_request_template.md

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,48 @@
1-
(Please add to the PR name the issue/s that this PR would close if merged by using a [Github](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) keyword. Example: `<feature name>. Closes #999`. If your PR is made by a single commit, please add that clause in the commit too. This is all required to automate the closure of related issues.)
2-
31
# Description
42

5-
Please include a summary of the change.
3+
Please include a short summary of the change. Don't just paste LLM output here.
64

7-
## Related issues
8-
Please add related issues.
5+
### Related issues
96

10-
## Type of change
7+
Please add related issues: the issues you are trying to solve as well as other issues that are important in the context of this pull request.
118

12-
Please delete options that are not relevant.
9+
### Type of change
1310

1411
- [ ] Bug fix (non-breaking change which fixes an issue).
1512
- [ ] New feature (non-breaking change which adds functionality).
1613
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected).
14+
- [ ] Chore (refactoring, dependency updates, CI/CD changes, code cleanup, docs-only changes).
1715

1816
# Checklist
1917

18+
Please complete this checklist carefully. It helps guide your contribution and lets maintainers verify that all requirements are met.
19+
20+
### Formalities
21+
2022
- [ ] I have read and understood the rules about [how to Contribute](https://intelowlproject.github.io/docs/GreedyBear/Contribute/) to this project.
23+
- [ ] I chose an appropriate title for the pull request in the form: `<feature name>. Closes #999`
24+
- [ ] My branch is based on `develop`.
2125
- [ ] The pull request is for the branch `develop`.
22-
- [ ] I have added documentation of the new features.
26+
- [ ] I have reviewed and verified any LLM-generated code included in this PR.
27+
28+
### Docs and tests
29+
30+
- [ ] I documented my code changes with docstrings and/or comments.
31+
- [ ] I have checked if my changes affect user-facing behavior that is described in the [docs](https://intelowlproject.github.io/docs/GreedyBear/Introduction/). If so, I also created a pull request in the [docs repository](https://github.com/intelowlproject/docs).
2332
- [ ] Linter (`Ruff`) gave 0 errors. If you have correctly installed [pre-commit](https://intelowlproject.github.io/docs/GreedyBear/Contribute/#how-to-start-setup-project-and-development-instance), it does these checks and adjustments on your behalf.
24-
- [ ] I have added tests for the feature/bug I solved. All the tests (new and old ones) gave 0 errors.
25-
- [ ] If changes were made to an existing model/serializer/view, the docs were updated and regenerated (check [CONTRIBUTE.md](https://github.com/intelowlproject/docs/blob/main/docs/GreedyBear/Contribute.md)).
26-
- [ ] If the GUI has been modified:
27-
- [ ] I have a provided a screenshot of the result in the PR.
28-
- [ ] I have created new frontend tests for the new component or updated existing ones.
33+
- [ ] I have added tests for the feature/bug I solved.
34+
- [ ] All the tests gave 0 errors.
35+
36+
### GUI changes
37+
38+
Ignore this section if you did not make any changes to the GUI.
39+
40+
- [ ] I have provided a screenshot of the result in the PR.
41+
- [ ] I have created new frontend tests for the new component or updated existing ones.
2942

30-
### Important Rules
31-
- If you miss to compile the Checklist properly, your PR won't be reviewed by the maintainers.
32-
- If your changes decrease the overall tests coverage (you will know after the Codecov CI job is done), you should add the required tests to fix the problem
33-
- Everytime you make changes to the PR and you think the work is done, you should explicitly ask for a review. After being reviewed and received a "change request", you should explicitly ask for a review again once you have made the requested changes.
43+
# Review process
44+
45+
- We encourage you to create a draft PR first, even when your changes are incomplete. This way you refine your code while we can track your progress and actively review and help.
46+
- If you think your draft PR is ready to be reviewed by the maintainers, click the corresponding button. Your draft PR will become a real PR.
47+
- If your changes decrease the overall tests coverage (you will know after the Codecov CI job is done), you should add the required tests to fix the problem.
48+
- Every time you make changes to the PR and you think the work is done, you should explicitly ask for a review. After receiving a "change request", address the feedback and click "request re-review" next to the reviewer's profile picture at the top right.

.github/workflows/_node.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@ on:
1717
required: false
1818
default: true
1919

20-
use_jest:
21-
description: Use jest suite
20+
21+
22+
use_vitest:
23+
description: Use vitest suite
2224
default: false
2325
type: boolean
2426
required: false
2527

28+
29+
2630
use_react:
2731
description: Use react library
2832
default: false
@@ -46,7 +50,7 @@ on:
4650
required: false
4751

4852
use_coverage:
49-
description: Output coverage. Require jest to be set.
53+
description: Output coverage. Require vitest to be set.
5054
default: false
5155
type: boolean
5256
required: false
@@ -104,12 +108,7 @@ jobs:
104108

105109
- name: Add dependencies
106110
run: |
107-
if [[ '${{ inputs.use_jest }}' != 'false' ]]; then
108-
npm i -D --package-lock-only jest @testing-library/jest-dom babel-jest @babel/core @babel/preset-env
109-
if [[ '${{ inputs.use_react }}' != 'false' ]]; then
110-
npm i -D --package-lock-only @testing-library/react
111-
fi
112-
fi
111+
113112
if [[ '${{ inputs.use_eslint }}' != 'false' ]]; then
114113
npm i -D --package-lock-only eslint
115114
fi
@@ -163,22 +162,24 @@ jobs:
163162
working-directory: ${{ inputs.working_directory }}
164163
shell: bash
165164

166-
- name: Run jest tests
167-
if: ${{ inputs.use_jest }}
168-
id: jest-tests
165+
- name: Run vitest tests
166+
if: ${{ inputs.use_vitest }}
167+
id: vitest-tests
169168
run: |
170169
if [[ '${{ inputs.use_coverage }}' != 'false' ]]; then
171-
CMD="npm test -- --silent --coverage"
170+
CMD="npm run test-coverage"
172171
else
173172
CMD="npm test"
174173
fi
175174
echo "Running command: ${CMD}"
176175
if [[ '${{ inputs.use_coverage }}' != 'false' ]] && [[ '${{ inputs.upload_coverage }}' != 'false' ]]; then
177-
echo "Uploading jest coverage report"
178-
echo "## Jest coverage report" >> $GITHUB_STEP_SUMMARY
179-
echo "$($CMD | grep -Ev "^(>|$)")" > jest-coverage.txt
180-
head -n -1 jest-coverage.txt | tail -n +2 >> $GITHUB_STEP_SUMMARY
181-
rm jest-coverage.txt
176+
echo "Uploading vitest coverage report"
177+
$CMD --no-color 2>&1 | sed -n '/^-\{3,\}/,$ p' > vitest-coverage.txt
178+
echo "## Vitest coverage report" >> $GITHUB_STEP_SUMMARY
179+
echo '```' >> $GITHUB_STEP_SUMMARY
180+
cat vitest-coverage.txt >> $GITHUB_STEP_SUMMARY
181+
echo '```' >> $GITHUB_STEP_SUMMARY
182+
rm vitest-coverage.txt
182183
else
183184
$CMD
184185
fi

.github/workflows/pull_request_automation.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ jobs:
3535

3636
use_react: true
3737
check_packages_licenses: false
38-
use_jest: true
38+
use_vitest: true
3939

4040
use_coverage: true
4141
upload_coverage: true
4242
max_timeout: 15
4343
node_versions: >-
44-
["20"]
44+
["24"]
4545
ubuntu_version: latest
4646

4747

@@ -78,8 +78,7 @@ jobs:
7878
postgres_version: 18
7979
use_memcached: false
8080
use_elastic_search: false
81-
use_rabbitmq: true
82-
rabbitmq_version: "4"
81+
use_rabbitmq: false
8382
use_mongo: false
8483
use_celery: false
8584

@@ -105,7 +104,6 @@ jobs:
105104
"POSTGRES_USER": "user",
106105
"POSTGRES_DB": "greedybear_db",
107106
"HTTPS_ENABLED": "not_enabled",
108-
"BROKER_URL": "amqp://guest:guest@rabbitmq:5672",
109107
}
110108
python_versions: >-
111109
["3.13"]

api/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
feeds_asn,
1414
feeds_pagination,
1515
general_honeypot_list,
16+
health_view,
1617
news_view,
1718
)
1819

@@ -31,6 +32,7 @@
3132
path("command_sequence", command_sequence_view),
3233
path("general_honeypot", general_honeypot_list),
3334
path("news/", news_view),
35+
path("health/", health_view),
3436
# router viewsets
3537
path("", include(router.urls)),
3638
# certego_saas:

api/views/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
from api.views.enrichment import *
44
from api.views.feeds import *
55
from api.views.general_honeypot import *
6+
from api.views.health import *
67
from api.views.news import *
78
from api.views.statistics import *

0 commit comments

Comments
 (0)