
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
The Ghidra Type Stubs library is a PEP 561 stubs package for the Ghidra API. The stub files can be used to improve your development experience in supported editors like PyCharm and Visual Studio Code.
The stubs can be installed with pip install ghidra-stubs*.whl
into the environment in which the
real Ghidra module (i.e., pyghidra
) is available. Any conformant tool will then use the stubs
package for type analysis purposes.
Once installed, all you need to do is import the Ghidra modules as usual, and your supported editor will do the rest.
import pyghidra
To get support for the Ghidra builtins, you need to import them as well. The type hints for those
exist in the generated ghidra_builtins
stub. Since it is not a real Python module, importing it at
runtime will fail.
try:
from ghidra.ghidra_builtins import *
except:
pass
If you are using PyGhidra from a Python 3 environment where no
real ghidra
module exists you can use a snippet like the following:
import typing
if typing.TYPE_CHECKING:
from ghidra.ghidra_builtins import *
# actual code follows here
typing.TYPE_CHECKING
is a special value that is always False
at runtime but True
during any
kind of type checking or completion.
Once done, just code & enjoy.
FAQs
Ghidra Type Stubs
We found that ghidra-stubs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.