Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Draft PDF
on:
push:
paths:
- joss/**
- .github/workflows/draft-pdf.yml

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Draft PDF' step
Uses Step
uses 'openjournals/openjournals-draft-action' with ref 'master', not a pinned commit hash
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: joss/paper.md
- name: Upload
uses: actions/upload-artifact@v4
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: joss/paper.pdf
Comment on lines +10 to +28

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 13 days ago

In general, you fix this by explicitly specifying a permissions block in the workflow (either at the top level or per job) to restrict the GITHUB_TOKEN to the minimal scopes required. For this workflow, the steps only read repository contents and upload an artifact; they do not push commits, modify issues, or alter PRs. The minimal and recommended setting is therefore contents: read.

The best fix is to add a root-level permissions block, which will apply to all jobs in this workflow (currently just paper). Insert it just after the name: line and before the on: block. Set contents: read as suggested by CodeQL. No additional imports, methods, or definitions are required because this is just a YAML configuration change.

Concretely:

  • Edit .github/workflows/draft-pdf.yml.
  • After line 1 (name: Draft PDF), insert:
permissions:
  contents: read

This limits the GITHUB_TOKEN in this workflow to read-only access to repository contents, which is sufficient for actions/checkout and the build step.

Suggested changeset 1
.github/workflows/draft-pdf.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml
--- a/.github/workflows/draft-pdf.yml
+++ b/.github/workflows/draft-pdf.yml
@@ -1,4 +1,6 @@
 name: Draft PDF
+permissions:
+  contents: read
 on:
   push:
     paths:
EOF
@@ -1,4 +1,6 @@
name: Draft PDF
permissions:
contents: read
on:
push:
paths:
Copilot is powered by AI and may make mistakes. Always verify output.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![CodeQL](https://github.com/MichaelCurrin/badge-generator/workflows/CodeQL/badge.svg)](https://github.com/KoslickiLab/YACHT/actions?query=workflow%3ACodeQL "Code quality workflow status")
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/KoslickiLab/YACHT/blob/main/LICENSE.txt)

YACHT is a mathematically rigorous hypothesis test for the presence or absence of organisms in a metagenomic sample, based on average nucleotide identity (ANI).
YACHT is a mathematically rigorous hypothesis test for the presence or absence of organisms in a metagenomic sample, based on Average Nucleotide Identity (ANI). Identifying whether a specific microbe is actually present in a metagenomic sample is often complicated by sequencing noise, low-abundance organisms, and high genomic similarity between species. Traditional profiling tools rely on simple thresholds that can lead to high false-positive rates. Various cohorts can utilize YACHT: microbiome researchers dealing with low-biomass samples, synthetic biologists needing to validate the composition of mock communities, and genomics researchers identifying specific metagenome-assembled genomes (MAGs) of interest within vast sequencing datasets.

The associated publication can be found here: https://academic.oup.com/bioinformatics/article/40/2/btae047/7588873

Expand All @@ -17,7 +17,7 @@ Please cite via:

</br>

## Quick start
## Quick demonstration
We provide a demo to show how to use YACHT. Please follow the command lines below to try it out:

```bash
Expand Down Expand Up @@ -89,8 +89,7 @@ conda install -c conda-forge -c bioconda yacht
```

### Manual installation
YACHT requires Python 3.6 or higher and Conda. We recommend using a virtual environment to ensure a clean and isolated workspace. This can be accomplished using either [Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) or [Mamba](https://github.com/mamba-org/mamba) (a faster alternative to Conda).

YACHT requires **Python >3.6** (and <3.12) with the following core genomics dependencies: `sourmash` (>=4.8.3), `sourmash_plugin_branchwater`, and `pytaxonkit`. The full list of dependencies can be found in the [environment configuration](https://github.com/KoslickiLab/YACHT/blob/main/env/yacht_env.yml). To ensure a clean and isolated workspace, we recommend using a virtual environment. This can be accomplished using either [Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) or [Mamba](https://github.com/mamba-org/mamba), a faster alternative to Conda.
#### Using Conda
To create your Conda environment and install YACHT, follow these steps:

Expand Down
Loading
Loading