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

Start testing and linting #14

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Start testing and linting #14

wants to merge 11 commits into from

Conversation

alvarolopez
Copy link
Contributor

No description provided.

@alvarolopez alvarolopez force-pushed the tox branch 2 times, most recently from 9eb12b5 to ba778eb Compare April 27, 2023 11:19
- Use timeout for requests
- Do not bind on 0.0.0.0
@alvarolopez
Copy link
Contributor Author

@IgnacioHeredia please check the following bandit error:

$ tox -e bandit
bandit: commands[0]> bandit -r ai4papi -x tests -s B110,B410
[main]	INFO	profile include tests: None
[main]	INFO	profile exclude tests: None
[main]	INFO	cli include tests: None
[main]	INFO	cli exclude tests: B110,B410
[main]	INFO	running on Python 3.10.9
Run started:2023-04-27 11:27:30.278193

Test results:
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
   Severity: Low   Confidence: High
   CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
   More Info: https://bandit.readthedocs.io/en/1.7.5/plugins/b101_assert_used.html
   Location: ai4papi/conf.py:30:8
29	    for k, v in params.items():
30	        assert "name" in v.keys(), f"Parameter {k} needs to have a name."
31	        assert "value" in v.keys(), f"Parameter {k} needs to have a value."

--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
   Severity: Low   Confidence: High
   CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
   More Info: https://bandit.readthedocs.io/en/1.7.5/plugins/b101_assert_used.html
   Location: ai4papi/conf.py:31:8
30	        assert "name" in v.keys(), f"Parameter {k} needs to have a name."
31	        assert "value" in v.keys(), f"Parameter {k} needs to have a value."
32	

--------------------------------------------------

Code scanned:
	Total lines of code: 482
	Total lines skipped (#nosec): 0

Run metrics:
	Total issues (by severity):
		Undefined: 0
		Low: 2
		Medium: 0
		High: 0
	Total issues (by confidence):
		Undefined: 0
		Low: 0
		Medium: 0
		High: 2
Files skipped (0):
bandit: exit 1 (0.13 seconds) /home/alvaro/w/prj/2022-ai4eosc/99-repos/ai4-papi> bandit -r ai4papi -x tests -s B110,B410 pid=17410
  bandit: FAIL code 1 (0.17=setup[0.04]+cmd[0.13] seconds)
  evaluation failed :( (0.19 seconds)

Copy link

sonarcloud bot commented Jun 7, 2024

Quality Gate Passed Quality Gate passed

Issues
10 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

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.

2 participants