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

outstanding type issues #1143

Open
6 of 13 tasks
mdrocco opened this issue Oct 26, 2022 · 10 comments
Open
6 of 13 tasks

outstanding type issues #1143

mdrocco opened this issue Oct 26, 2022 · 10 comments

Comments

@mdrocco
Copy link
Contributor

mdrocco commented Oct 26, 2022

This is a spinoff of #929 , following up the first batches of type fixes in various PRs. The following files are reported to contain type issues according to pyright with Python 3.10:

  • keylime/backport_dataclasses.py
  • keylime/cloud_verifier_tornado.py
  • keylime/da/examples/file.py
  • keylime/da/examples/redis.py
  • keylime/da/examples/sqldb.py
  • keylime/da/examples/tsa_rfc3161.py
  • keylime/da/record.py
  • keylime/mba/elchecking/example.py
  • keylime/ima/ima_dm.py
  • keylime/keylime_agent.py
  • keylime/migrations/versions/*
  • keylime/revocation_actions/update_crl.py
  • test/data/template-invalid-adjust/2.0/adjust.py
@mdrocco
Copy link
Contributor Author

mdrocco commented Nov 17, 2022

Here is a new one, following up #1180. The type checker reports a possibly unbounded variable in the verifier's code.

session.add(VerfierMain(**agent_data, ima_policy=ima_policy_stored))

I tried the obvious fix but it breaks CI tests:

https://github.com/mdrocco/keylime/blob/ccfd29a2942eed2bed86628d7fadc44bd86b6810/keylime/cloud_verifier_tornado.py#L576-L577

@mdrocco
Copy link
Contributor Author

mdrocco commented Nov 21, 2022

Update: PR #1186 fixes the reported problems in ima/ima_dm.py, I am removing the section of the issue about that file.

@mdrocco
Copy link
Contributor Author

mdrocco commented Nov 21, 2022

Update: PR #1194 fixes the reported problems in ima/file_signatures.py and json.py, I am removing the section of the issue about those files.

@stefanberger
Copy link
Contributor

Update: PR #1196 fixes the reported problems in cmd/ima_emulator_adapter.py and cmd/convert_ima_policy.py

@mdrocco
Copy link
Contributor Author

mdrocco commented Nov 21, 2022

I am restructuring this issue to keep track of all the files with outstanding type issues, considering the existing PRs.

@mdrocco
Copy link
Contributor Author

mdrocco commented Nov 22, 2022

update: upgrading Lark from 1.1.3 to 1.1.4 fixed the issue below:

/home2/mdrocco/git/keylime/keylime/ima/ima_dm.py
  /home2/mdrocco/git/keylime/keylime/ima/ima_dm.py:16:18 - error: "Lark" is not exported from module "lark"
    Import from "lark.lark" instead (reportPrivateImportUsage)
  /home2/mdrocco/git/keylime/keylime/ima/ima_dm.py:16:24 - error: "Transformer" is not exported from module "lark"
    Import from "lark.visitors" instead (reportPrivateImportUsage)
  /home2/mdrocco/git/keylime/keylime/ima/ima_dm.py:16:37 - error: "v_args" is not exported from module "lark"
    Import from "lark.visitors" instead (reportPrivateImportUsage)

@mdrocco
Copy link
Contributor Author

mdrocco commented Feb 14, 2023

update: PR #1268 (and #1308) fixed the verifier. How much do we care about the outstanding issues? @aplanas @THS-on @stefanberger

@THS-on
Copy link
Member

THS-on commented Feb 15, 2023

I think looking at elchecking makes probably sense. The other ones are a lower priority.

@aplanas
Copy link
Contributor

aplanas commented Feb 16, 2023

dataclases: that file should be ignored, and dropped once we upgrade the minimal python
da/*: that can be done later, as the issue of testing is more pressure

From the rest maybe ima and elchecking

@mdrocco
Copy link
Contributor Author

mdrocco commented Feb 16, 2023

Thanks, I will look at elchecking next. @aplanas, everything ima is type-fixed as far as I can tell.

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

No branches or pull requests

4 participants