Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

astree

Latest version: v0.1.1

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
PyPI package Publisher: ellainng, wispsy
0 Stars
0 Forks
2 Versions
360 Downloads
Python Repo language

Scan summary

astree was last scanned on 24 Nov 2026 at version 0.1.1. Risk score 5 of 100 (low). No malicious behavior was detected.

  • Releases: 2 versions; the latest was published on 24 Nov 2026.
  • Findings: 1 rule fired in version 0.1.1 (1 low). The score describes this version only.
  • Downloads: 360 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.1 LATEST 24 Nov 2026 1 rule fired
0.1.0 8 Nov 2026 No rules fired

Rules fired in 0.1.1: 1

Findings

1 Low

Findings for v0.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

Maintainer or owner changed

The package's maintainer or owner differs from the previous version. This is usually benign, such as a transfer or reorganization, but account takeovers look the same at first. Shown for awareness.

LOW
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

The score describes 0.1.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

astree

Shared structural traversal with specialized HTML, JSON, Markdown, Python, and JavaScript adapters.

Requires Python 3.14+.

Highlights

  • Shared Traversal: Use walk, ancestors, descendants, and transform where the node model supports them.
  • Specialized Adapters: Preserve DOM, value-tree, source-span, and language-AST semantics instead of forcing one node type.
  • Full DOM Navigation: Navigable Document and Node tree with parent/child links and attributes.
  • CSS Selectors: Fast CSS selector queries (select, select_one).
  • Streaming Collectors: Single-pass LinkCollector and TextCollector with bounds protection.
  • Declarative Schema Extraction: extract and extract_all using Field definitions with type converters and cardinality validation.
  • Configurable Limits: Protect against deeply nested tags or resource exhaustion (max_depth, max_nodes, max_chars).

Installation

pip install astree

For development:

git clone https://github.com/wispsy/astree.git
cd astree
uv sync

JavaScript support is optional:

uv sync --extra javascript

Quick Start

Basic Parsing & Queries
from astree import Document

doc = Document.from_html('''
<!doctype html>
<html>
  <head><title>My Article</title></head>
  <body>
    <article class="card" data-id="42">
      <h2>Headline</h2>
      <a href="/post/42">Read story</a>
    </article>
  </body>
</html>
''')

assert doc.title == 'My Article'
card = doc.select_one('article.card')
assert card is not None
assert card.attrs['data-id'] == '42'

link = card.find('a', href=True)
assert link is not None
assert link.attrs['href'] == '/post/42'
assert card.get_text(' ', strip=True) == 'Headline Read story'
Structural Adapters
from astree import ancestors, transform, walk
from astree.json import parse as parse_json
from astree.python import parse as parse_python

json_tree = parse_json('{"count": 2}')
json_tree = transform(json_tree, lambda node: node.value + 1
                      if node.kind == 'number' else node)
assert json_tree.value == {'count': 3}

python_tree = parse_python('answer = 42')
assert list(walk(python_tree))

astree.markdown.parse returns a source-span tree for headings, paragraphs, lists, and fenced code blocks. astree.javascript.parse returns a tree-sitter JavaScript node and requires the optional extra.

Structured Record Extraction
from astree import Document, Field, extract_all

records = extract_all(doc, 'article.card', {
    'id': Field(attribute='data-id', convert=int),
    'headline': Field('h2'),
    'url': Field('a', attribute='href'),
})

# [{'id': 42, 'headline': 'Headline', 'url': '/post/42'}]

Documentation

See docs/api.md for full API details, selector capabilities, collectors, and structured extraction specifications.

Running Tests

python -m unittest discover -s tests -v

License

MIT

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases astree

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Frame 2085668439 (1)
Group 1261154229