Skip to content
This repository has been archived by the owner on Jun 25, 2019. It is now read-only.

Add ISA_dep_plugin for dependency checking and visualization #26

Open
wants to merge 35 commits into
base: pkg_dep
Choose a base branch
from

Conversation

dallagi
Copy link

@dallagi dallagi commented Feb 4, 2016

This plugin currently builds internally a dependency graph, renders it with graphviz and returns both a .dot file representing the graph and, if graphviz is installed, a visual representation of the graph.
Temporary data is stored in the report directory, and automatically deleted after a succesfull build.

ereshetova and others added 28 commits January 19, 2016 14:12
Taking pkg alias info into use in CVE plugin
Since checksec.sh functionality relies on readelf(1) utility,
which is part of binutils package, we should add runtime
dependencies on binutils explicitly.

Signed-off-by: Sergey Popovich <[email protected]>
Making junit xml output work for every plugin
Adding checks for executable stack to CFA plugin
 Adding checks for executables that don't drop groups properly
Adding MPX-related checks
…me (PN)

While we skipping analysesource task for most of native, nativesdk,
cross, crosssdk and other stuff we still have packages like glibc-initial
in our report.

This is because such initial packages are not belonging to any specific
target/image class and thus not subject to the analysesource task removal.

To address this issue use Base Package Name (BPN) since it just version of
Package Name (PN) with stripped suffixes like -initial, -native, -cross etc.

Signed-off-by: Sergey Popovich <[email protected]>
Two common and public tasks exposed by the class are analyse_sources
and analyse_sources_all. Both used to generate ISAFW reports against
given package(s) without building them.

Add descriptive text strings to the task definitions within class to
give more information on them to the user in the listtasks bitbake
task output.

  $ bitbake -c listtasks <target>
  do_analyse_sources             Produce ISAFW reports based ...
  do_analyse_sources_all         Produce ISAFW reports for all ...
  ...

TODO: find a way to hide class private tasks do_analysesource and
      do_process_reports.

Signed-off-by: Sergey Popovich <[email protected]>
This plugin currently builds a dependency graph internally and
puts it in the log file.
Temporary data is stored in the report directory, and automatically
deleted after a succesfull build.
Additional fixes for xml output
Fetch checksec instead of storing the sript
After the dependency graph has been internally created, generate a
.dot file representing the graph and call graphviz to render it.
Transitive reduction is applied to the graph definition.
Dependencies are now saved as an object <dep, details>, as run-time
dependencies include details like package version.
Dependencies are filtered based on DEPENDENCIES_BLACKLIST.

A class has been used instead of a namedtuple because openembedded
monkey-patches the namedtuple module with an alternative one which
is not pickle-able.
PNG graphs were often unreadable, especially in very large graphs.
While SVG files are not as convenient and easy to open, they are more
suitable for this purpose.
@ostroproject-ci
Copy link

Can one of the admins verify this patch?

Those methods are useful when debugging.
@ereshetova
Copy link
Contributor

ok to test

@kad
Copy link
Member

kad commented Mar 4, 2016

I would strongly recommend to rebase this PR, as there are too many "merge commits" present in change set. @dallagi please rebase your changes on top of origin/master, making sure that only your change commits are present in PR.

@ereshetova
Copy link
Contributor

@kad, this commit is for me to track progress of the work that @dallagi does, so there is no need to rebase it yet. This work is not ready to be merged to main repo for a while still.

dallagi added 6 commits March 23, 2016 17:11
Add the possibility to generate partial dependency graphs.

Dependency graphs are now color-coded: vulnerable packages
are represented by red nodes, while packages that depend on vulnerable
packages are represented by yellow nodes.

Edges in dependency graphs now contain info (e.g., pkg version) when
those are provided.
… packages

Mapping of source packages to the binary packages they generate is built
during the package-processing phase, and it is stored in a temporary file.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants