Giter Site home page Giter Site logo

Comments (3)

de-jcup avatar de-jcup commented on May 30, 2024

Current workaround is to always add a dummy entry - e.g. "http://example.com" as whitelist entry

from sechub.

de-jcup avatar de-jcup commented on May 30, 2024

Hmm.. tried out old version (0.10.3) and there tests do not fail but there was an error

After trying out to create a project I found a way to reproduce the problem:

  1. create some testdata
  • start scenario2 integration test.
  • copy the executed command (contains generated api tokens for scenario2_user1)
  1. now create a new project by DeveloperAdmin UI:
  • name "testproject"
  • description "xxx"
  • user: scenario2_user1
  • whitelist: at first dialog just press OK on next dialog do the cancel (exact this way)
  1. assign scenario2_user1 to the project.
  2. execute a normal scan
  • use copied command from 1 and replace "scanAsync" with "scan". Also change project to "testproject" and start

You will receive a 500 error message at client side.
On server side a NPE has occurred :

java.lang.NullPointerException: null
	at com.daimler.sechub.domain.schedule.whitelist.ProjectWhiteListSecHubConfigurationValidationService.fetchAllowedUris(ProjectWhiteListSecHubConfigurationValidationService.java:69) ~[main/:na]
	at 
...

from sechub.

de-jcup avatar de-jcup commented on May 30, 2024

There is another problem: When adding something not being valid (e.g. the empty entry in former first white list dialog) we cannot delete the project any longer:

org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "C04_ADM_PROJECTWHITELIST_PROJECT_ID: PUBLIC.ADM_PROJECT_WHITELIST_URI FOREIGN KEY(PROJECT_PROJECT_ID) REFERENCES PUBLIC.ADM_PROJECT(PROJECT_ID) ('testproject')"; SQL statement:
delete from adm_project where project_id=? and version=? [23503-197]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) ~[h2-1.4.197.jar:1.4.197]
...
	at com.daimler.sechub.domain.administration.project.ProjectDeleteService.deletProject(ProjectDeleteService.java:42) ~[main/:na]
	at com.daimler.sechub.domain.administration.project.ProjectDeleteService$$FastClassBySpringCGLIB$$b95f38d3.invoke(<generated>) ~[main/:na]
...

Updating the white list by an dummy entry like "https://www.example.com" did solve the problem and admin ui /service was able to delete the project then.

This did also prevent execution of IntegrationTests for the test scenario where used user was created!

from sechub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.