Skip to content

Commit

Permalink
feat(java): classfile and jar readers (#49)
Browse files Browse the repository at this point in the history
* feat(java): classfile and jar readers

- feat(java): reader facade for classfiles
- feat(java): support for reading jpms module classes
- feat(java): support for reading jars
- test(java): compile harness
- test(java): jar assemble harness
- test(java): full test coverage for java package
- test(java); inline testsuite for class parser
- chore(java): rewrite much of class parser as typescript
- chore: bump packages for eventual release → `1.0.2`

Not yet finished:
JAR reader.

Signed-off-by: Sam Gammon <sam@elide.ventures>

* chore: run formatter

Signed-off-by: Sam Gammon <sam@elide.ventures>

* feat(java): implement manifest reader

Signed-off-by: Sam Gammon <sam@elide.ventures>

* feat(java): implement jar file support and tests

Signed-off-by: Sam Gammon <sam@elide.ventures>

* chore: sync lockfiles, general cleanup

Signed-off-by: Sam Gammon <sam@elide.ventures>

* fix: bad prettier run

Signed-off-by: Sam Gammon <sam@elide.ventures>

---------

Signed-off-by: Sam Gammon <sam@elide.ventures>
  • Loading branch information
sgammon committed Mar 28, 2024
1 parent 3d13d3a commit 688639e
Show file tree
Hide file tree
Showing 107 changed files with 7,804 additions and 2,293 deletions.
67 changes: 26 additions & 41 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education,
socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:
Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
Expand All @@ -22,55 +19,43 @@ include:

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the
project or its community in public spaces. Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting as an appointed representative at an
online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at apps at elide dot cloud. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
apps at elide dot cloud. All complaints will be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to
the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq
4 changes: 2 additions & 2 deletions .github/GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
company, which is known formally as _Elide Technologies, Inc._, a registered Delaware Limited Liability Company. Elide
is also supported by contributions from independent engineers all over the world.

Elide is a community project, and we welcome new contributors. We are committed to fostering a welcoming environment.
We expect contributors to follow the [Contributor Covenant Code of Conduct][2] when discussing the project in any forum.
Elide is a community project, and we welcome new contributors. We are committed to fostering a welcoming environment. We
expect contributors to follow the [Contributor Covenant Code of Conduct][2] when discussing the project in any forum.

## Project Leadership

Expand Down
20 changes: 9 additions & 11 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ Security issues are addressed promptly, and we continuously enhance project secu

## Supported Versions

The Elide project is still early, but we intend to support the latest release and immediate past release.
Once the project hits a level of stability suitable for a `1.0` version we will update this document and issue an
LTS release.
The Elide project is still early, but we intend to support the latest release and immediate past release. Once the
project hits a level of stability suitable for a `1.0` version we will update this document and issue an LTS release.

**Current version support matrix:**

Expand All @@ -23,9 +22,9 @@ LTS release.

## Reporting a Vulnerability

**We use GitHub issues to track vulnerabilities.** [Click here][9] to report a new issue.
If you need to report a vulnerability privately, please use the email address on our main GitHub organization page
(`apps` at `elide` dot `cloud`).
**We use GitHub issues to track vulnerabilities.** [Click here][9] to report a new issue. If you need to report a
vulnerability privately, please use the email address on our main GitHub organization page (`apps` at `elide` dot
`cloud`).

If you need to provide secure information or your report needs to be encrypted, please use our PGP key, as listed on
public key servers at the same email address.
Expand All @@ -42,8 +41,8 @@ Other (older) releases may receive backports on a case-by-case basis.

We will publish security advisories for any vulnerabilities that we address.

These advisories will be published on our GitHub organization page and will be linked to from this document;
the main `elide` repository will also have a link to this document.
These advisories will be published on our GitHub organization page and will be linked to from this document; the main
`elide` repository will also have a link to this document.

**At this time, no security advisories have been announced.**

Expand All @@ -60,9 +59,8 @@ Elide employs Gradle for dependency assurance, with `SHA-256` and `PGP` used for

### Attestations and Signing

Elide ships with [SLSA attestations][3] for all modules, and embeds an SBOM with each binary artifact.
Library releases are signed with PGP and published to Maven Central; all releases are additionally registered with
[Sigstore][4].
Elide ships with [SLSA attestations][3] for all modules, and embeds an SBOM with each binary artifact. Library releases
are signed with PGP and published to Maven Central; all releases are additionally registered with [Sigstore][4].

Container image bases carry SLSA attestations and are registered with Sigstore.

Expand Down
26 changes: 13 additions & 13 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
codecov:
require_ci_to_pass: true
bot: "elidebot"
bot: 'elidebot'
notify:
wait_for_ci: true

coverage:
precision: 2
round: down
range: "25...40"
range: '25...40'
status:
project:
default:
informational: true
patch: off

comment:
layout: "reach,diff,flags,files,footer"
layout: 'reach,diff,flags,files,footer'
behavior: default
require_changes: false

Expand All @@ -33,13 +33,13 @@ github_checks:
annotations: true

ignore:
- "jdk"
- "samples"
- "tools/processor"
- "tools/substrate/injekt"
- "tools/substrate/sekret"
- "tools/substrate/interakt"
- "tools/substrate/compiler-util"
- "tools/plugin/gradle-plugin"
- "packages/proto/proto-flatbuffers"
- "packages/graalvm/src/main/kotlin/elide/runtime/feature"
- 'jdk'
- 'samples'
- 'tools/processor'
- 'tools/substrate/injekt'
- 'tools/substrate/sekret'
- 'tools/substrate/interakt'
- 'tools/substrate/compiler-util'
- 'tools/plugin/gradle-plugin'
- 'packages/proto/proto-flatbuffers'
- 'packages/graalvm/src/main/kotlin/elide/runtime/feature'
8 changes: 4 additions & 4 deletions .github/dependency-review-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

license-check: true
vulnerability-check: true
fail-on-severity: "high"
fail-on-severity: 'high'

allow-ghsas:
## Allow `node-fetch`, because it is unused in actual outputs made by this library.
- "GHSA-r683-j2x4-v87g"
- "GHSA-w7rc-rwvf-8q5r"
- 'GHSA-r683-j2x4-v87g'
- 'GHSA-w7rc-rwvf-8q5r'

## Allow `jszip`, because we do not use it in the browser.
- "GHSA-jg8v-48h5-wgxg"
- 'GHSA-jg8v-48h5-wgxg'
16 changes: 8 additions & 8 deletions .github/pr-badge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#

## Draft/ready for review
- label: "Status"
message: "Draft"
color: "gray"
when: "$isDraft"
- label: "Status"
message: "Ready for review"
color: "green"
when: "$isDraft === false"
- label: 'Status'
message: 'Draft'
color: 'gray'
when: '$isDraft'
- label: 'Status'
message: 'Ready for review'
color: 'green'
when: '$isDraft === false'
10 changes: 5 additions & 5 deletions .github/workflows/check.dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Checks: Dependency Review"
name: 'Checks: Dependency Review'

"on":
'on':
workflow_call: {}
workflow_dispatch: {}

Expand All @@ -9,16 +9,16 @@ permissions:

jobs:
dependency-review:
name: "Dependency Review"
name: 'Dependency Review'
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: "Setup: Checkout"
- name: 'Setup: Checkout'
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
persist-credentials: false
- name: "Checks: Dependency Review"
- name: 'Checks: Dependency Review'
uses: actions/dependency-review-action@9129d7d40b8c12c1ed0f60400d00c92d437adcce # v4.1.3
10 changes: 5 additions & 5 deletions .github/workflows/check.gradle-wrapper.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Checks: Gradle Wrapper"
name: 'Checks: Gradle Wrapper'

"on":
'on':
workflow_call: {}
workflow_dispatch: {}

Expand All @@ -9,16 +9,16 @@ permissions:

jobs:
validation:
name: "Check: Gradle Wrappers"
name: 'Check: Gradle Wrappers'
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: "Setup: Checkout"
- name: 'Setup: Checkout'
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
persist-credentials: false
- name: "Check: Gradle Wrappers"
- name: 'Check: Gradle Wrappers'
uses: gradle/wrapper-validation-action@699bb18358f12c5b78b37bb0111d3a0e2276e0e2 # v2.1.1
10 changes: 5 additions & 5 deletions .github/workflows/check.hashes.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Checks: Hashes"
name: 'Checks: Hashes'

"on":
'on':
workflow_call: {}
workflow_dispatch: {}

Expand All @@ -9,16 +9,16 @@ permissions:

jobs:
validation:
name: "Check: Hashes"
name: 'Check: Hashes'
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: "Setup: Checkout"
- name: 'Setup: Checkout'
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
persist-credentials: false
- name: "Check: Hashes"
- name: 'Check: Hashes'
uses: sgammon/verify-hashes@cac7d57e01915a3fc9bda26373fb85d3f71dea68 # v1.0.0-rc1
Loading

0 comments on commit 688639e

Please sign in to comment.