News for hackers. Stuff that matters.
Re:Show HN: Modguard – a lightweight Python tool for enforci... by Varauk on Wednesday February 21, 2024 @12:24PM (#39456679)
Great idea, definitely ran into a lot of these problems at my last gig. Will try this out next time I'm working on a python project.

> specific nonstandard custom syntax to access modules/submodules such as getattr or dynamically generated namespaces will not be caught by modguard

Are any plans to get modguard to take these cases into account? I imagine this is harder without doing anything at runtime.

Re:Show HN: Modguard – a lightweight Python tool for enforci... by 0x63_Problems on Wednesday February 21, 2024 @12:36PM (#39456867)
Yup! We have looked into runtime checks to supplement the static analysis. From talking to other users, they've used similar runtime checks in CI and staging environments to catch dynamic imports and even check specific method usages.