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

Bump some deps, fix some bugs #1

Closed
wants to merge 14 commits into from
Closed

Bump some deps, fix some bugs #1

wants to merge 14 commits into from

Conversation

kolyshkin
Copy link
Owner

@kolyshkin kolyshkin commented Oct 19, 2021

  1. deps: switch to google/uuid

    It looks like satori/go.uuid has changed its API in the past (returning
    two values rather than one from New), and it is not maintained since
    around 2018.

    Switch to google/uuid which seems to be well maintained.

  2. validate: fix tests for new xeipuuv/gojsonschema

    New(er) xeipuuv/gojsonschema package is trying to fetch id fields,
    which in the spec were looking like this:

         "id": "https://opencontainers.org/schema/bundle/linux"
    

    Obviously, this results in HTTP 404s, and multiple test failures.

    This was fixed by schema: Completely drop our JSON Schema 'id' properties opencontainers/runtime-spec#945
    which ended up in runtime-spec v1.0.2.

    Now, if we want to bump xeipuuv/gojsonschema (we do), we need to test
    against at least v1.0.2 of runtime-spec, for the reason explained above.

    Bump the spec version in all test cases, remove or fix some test cases.

    In particular:

    • remove "process is required" as it needed v1.0.0-rc5 version of spec.
    • remove "args is required" as args are no longer required since commit
      opencontainers/runtime-spec@deb4d954eafc4fc.
    • fixup "invalid seccomp action" error as it now also has SCMP_ACT_LOG.
  3. deps: bump github.com/xeipuuv/gojsonschema to v1.2.0

    Brought to you by

         go get github.com/xeipuuv/gojsonschema@latest
         go mod vendor
         go mod tidy
    
  4. deps: bump sirupsen/logrus to v1.8.1

  5. deps bump github.com/mrunalp/fileutils to v0.5.0

  6. deps: bump github.com/opencontainers/selinux to v1.9.1

  7. deps: bump github.com/syndtr/gocapability to latest

  8. deps: github.com/hashicorp/go-multierror to v1.1.1

Makes it possible to specify the closID parameter of intelRdt in linux
runtime spec.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
Podman had an issue, where someone was attemptig to mount all tmpfs
within the container as noexec. They were able to get most of it done
but "/dev", because it was done down in the runtime spec.

I can think of no reason why "/dev", should not be mounted with noexec
especially within a container.  I know it is not mounted by default in
Fedora that way, but I do not know why.

Debian looks like it has made the change, and only one bug a couple of
years ago showed issues, which would not apply to containers.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940171

Anyways this would make containers "slightly" more secure, and I think it
is worth doing.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
New(er) xeipuuv/gojsonschema package is trying to fetch id fields,
which in the spec were looking like this:

	"id": "https://opencontainers.org/schema/bundle/linux"

Obviously, this results in HTTP 404s, and multiple test failures.

This was fixed by opencontainers/runtime-spec#945
which ended up in runtime-spec v1.0.2.

This essentially means with newer xeipuuv/gojsonschema we are no longer
able to validate against runtime-spec < 1.0.2.

To adopt for a new xeipuuv/gojsonschema, do the following:

1. Add the version check, add a test case for it.

2. Remove some test cases:

   - "process is required" as it needed v1.0.0-rc5 version of spec.
   - "args is required" as args are no longer required since commit
      opencontainers/runtime-spec@deb4d954eafc4fc.

3. Bump the spec version in all test cases.

4. Fix "invalid seccomp action" error as it now also has SCMP_ACT_LOG.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Brought to you by

	go get github.com/xeipuuv/gojsonschema@latest
	go mod vendor
	go mod tidy

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
vbatts and others added 10 commits October 21, 2021 21:39
Change /dev to be mounted by default with /noexec
generate: add --linux-intelRdt-closid option
There are many .t files in subdirectories. Fix gitignore accordingly.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
It looks like satori/go.uuid has changed its API in the past (returning
two values rather than one from New), and it is not maintained since
around 2018.

Switch to google/uuid which seems to be well maintained.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Also, fix a deprecation warning from NewPid.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
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.

5 participants