cta-wave / dpctf-test-runner

Repo for the DPCTF Test Runner
Other
0 stars 3 forks source link

launch fails with security error on HbbTV if launched as broadcast-independent #61

Open jpiesing opened 6 days ago

jpiesing commented 6 days ago

The test runner fails on HbbTV if the app has been launched as broadcast-independent, e.g. by a manufacturer back-door into the system.

The failure is reported in the .json reports as a security error when attempting to stop the broadcast.

hbbtv.js needs to be modified to catch the following error and just continue.

image

jpiesing commented 6 days ago

@afrawei

jpiesing commented 6 days ago

62bb2f36-cfhd_12.5_25_50-local-Xx01.json

jpiesing commented 6 days ago

If I comment out the check in hbbtv.js in the test runner then the test runs successfully in this context.

jpiesing commented 6 days ago

Or indeed this from a different TV set. 390ec70c-cfhd_12.5_25_50-local-Xx01.json

FritzHeiden commented 5 days ago

I pushed a fix for this, however, I am unable to test if the fix actually works: https://github.com/cta-wave/dpctf-tests/pull/197

louaybassbouss commented 5 days ago

@afrawei the fixes @FritzHeiden pushed are not tagged yet as a release in dpctf-tests repo in order to test these changes please follow these steps (if everything works for your, we can provide a release).

  1. ./build.sh master hbbtvhotfix --tests-branch master (this will create a docker image tagged as hbbtvhotfix)
  2. in docker-compose.yml#L6, change into image: dpctf:hbbtvhotfix
  3. docker-compose up --force-recreate
afrawei commented 4 days ago

@FritzHeiden @louaybassbouss I got below error with the hotfix ctvwave@EUBENB190005:~/dpctf-deploy$ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE dpctf v2.0.0 217163d985e4 3 minutes ago 1.6GB dpctf hbbtvhotfix dde982a2ec9e 9 minutes ago 1.6GB ctvwave@EUBENB190005:~/dpctf-deploy$ docker-compose up --force-recreate Recreating 0433d8cc88e2_dpctf ...

ERROR: for 0433d8cc88e2_dpctf 'ContainerConfig'

ERROR: for dpctf 'ContainerConfig' Traceback (most recent call last): File "/usr/bin/docker-compose", line 33, in sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')()) File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main command_func() File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 203, in perform_command handler(command, command_options) File "/usr/lib/python3/dist-packages/compose/metrics/decorator.py", line 18, in wrapper result = fn(*args, **kwargs) File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1186, in up to_attach = up(False) File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1166, in up return self.project.up( File "/usr/lib/python3/dist-packages/compose/project.py", line 697, in up results, errors = parallel.parallel_execute( File "/usr/lib/python3/dist-packages/compose/parallel.py", line 108, in parallel_execute raise error_to_reraise File "/usr/lib/python3/dist-packages/compose/parallel.py", line 206, in producer result = func(obj) File "/usr/lib/python3/dist-packages/compose/project.py", line 679, in do return service.execute_convergence_plan( File "/usr/lib/python3/dist-packages/compose/service.py", line 579, in execute_convergence_plan return self._execute_convergence_recreate( File "/usr/lib/python3/dist-packages/compose/service.py", line 499, in _execute_convergence_recreate containers, errors = parallel_execute( File "/usr/lib/python3/dist-packages/compose/parallel.py", line 108, in parallel_execute raise error_to_reraise File "/usr/lib/python3/dist-packages/compose/parallel.py", line 206, in producer result = func(obj) File "/usr/lib/python3/dist-packages/compose/service.py", line 494, in recreate return self.recreate_container( File "/usr/lib/python3/dist-packages/compose/service.py", line 612, in recreate_container new_container = self.create_container( File "/usr/lib/python3/dist-packages/compose/service.py", line 330, in create_container container_options = self._get_container_create_options( File "/usr/lib/python3/dist-packages/compose/service.py", line 921, in _get_container_create_options container_options, override_options = self._build_container_volume_options( File "/usr/lib/python3/dist-packages/compose/service.py", line 960, in _build_container_volume_options binds, affinity = merge_volume_bindings( File "/usr/lib/python3/dist-packages/compose/service.py", line 1548, in merge_volume_bindings old_volumes, old_mounts = get_container_data_volumes( File "/usr/lib/python3/dist-packages/compose/service.py", line 1579, in get_container_data_volumes container.image_config['ContainerConfig'].get('Volumes') or {} KeyError: 'ContainerConfig'

afrawei commented 4 days ago

@louaybassbouss after I followed your instruction, how do I rebuild the original image? I got the same error as above when using "./build.sh"

afrawei commented 3 days ago

@FritzHeiden @louaybassbouss After removing all images and redo the commands, issue is still seen. hbbtv code 663ffc78_results_json.zip

FritzHeiden commented 3 days ago

@afrawei Did you use this command to build the image? ./build.sh master hbbtvhotfix --tests-branch master

The fix is not included if you just use ./build.sh

afrawei commented 3 days ago

@FritzHeiden yes, I did the command to build the image. ./build.sh master hbbtvhotfix --tests-branch master build

FritzHeiden commented 3 days ago

This looks good so far. The command builds an image with latest changes in all repository and puts the tag hbbtvhotfix on it. So you also need to tell docker to use that tag in the docker-compose.yml. Did you change image to dpctf:hbbtvhotfix?

afrawei commented 3 days ago

@FritzHeiden Yes, I also did the change to yml. image

FritzHeiden commented 3 days ago

The generated directory did not contain the fix, so it didn't appear in your build. I pushed changes to fix this. Please rebuild the image using ./build.sh master hbbtvhotfix --tests-branch master --reload-tests