Closed Bug 1747536 (cargo-audit) Opened 4 years ago Closed 3 months ago

mozlint: Investigate and add cargo audit support

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(firefox142 fixed)

RESOLVED FIXED
142 Branch
Tracking Status
firefox142 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre, Mentored)

References

(Depends on 2 open bugs, Regressed 2 open bugs)

Details

(Keywords: good-first-bug, Whiteboard: [lang=python][lang=rust])

Attachments

(3 files)

Product: Firefox Build System → Developer Infrastructure

Hello, I am interested to work on this issue. I am new to open source community very interested to work on an issue?
Could you help me please how I will start and contribute to this issue ?

Thank you for your time.

I have been working on this issue and am close to the point where I can submit a patch for review, but need some guidance before I can continue. At present, I have created a setup script, a mach lint interface, a Taskcluster job, documentation, and unit tests.

  1. I have not yet started on fixing the errors that cargo-audit has identified. Some errors should be fairly simple to address, but fixing others would be projects in and of themselves. How should I handle this?

  2. cargo-audit has an experimental fix sub-command that is not installed by default, and I have not integrated. Should this functionality be integrated into mozlint at this time?

  3. cargo-audit does not provide line and column number information on reported issues because the error isn't necessarily located in the Cargo.lock file that was scanned (it could be in some subordinate file) and any fixes should be performed on Cargo.toml files anyhow. Implementing a script to find the line in the Cargo.lock file that is at fault would be difficult, because the error could be in several different locations, and confusing, because mozlint returns the name of the file that was scanned, but the line number could refer to another unspecified file. At present, I simply set line and column numbers to -1, but is there a better way to handle this?

  4. Finally, cargo-audit's output is quite verbose. I have hidden some of the less important information behind the show_verbose flag, but am unsure if this is acceptable behaviour for a linter.

Please let me know how I should proceed, and if this is an acceptable point at which to push to Phabricator for review.

Flags: needinfo?(sledru)

Adds linter definition, payload and setup, tests, and Taskcluster job.

Assignee: nobody → csditchfield
Status: NEW → ASSIGNED
See Also: → 1451332, 1688435

Adds linter definition, payload and setup, tests, and Taskcluster job.

I have not yet started on fixing the errors that cargo-audit has identified. Some errors should be fairly simple to address, but fixing others would be projects in and of themselves. How should I handle this?

Add them to the exclude list :)

cargo-audit has an experimental fix sub-command that is not installed by default, and I have not integrated. Should this functionality be integrated into mozlint at this time?

we can install it in the CI

Finally, cargo-audit's output is quite verbose. I have hidden some of the less important information behind the show_verbose flag, but am unsure if this is acceptable behaviour for a linter.

This is fine

Flags: needinfo?(sledru)
Attachment #9381817 - Attachment description: WIP: Bug 1747536 - Integrate cargo-audit into mozlint → Bug 1747536 - Integrate cargo-audit into mozlint. r?#linter-reviewers

This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit BugBot documentation.

Assignee: csditchfield → nobody
Status: ASSIGNED → NEW
Assignee: nobody → sledru
Depends on: 1973225
Depends on: 1973226
Alias: cargo-audit
Regressions: 1973857
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch

We might also consider cargo-deny.

@lars: yes, it is bug 1802700

See Also: → 1802700
Duplicate of this bug: 1451332

Note: maybe it will move this task as tier-2 because new CVE can be opened on existing crate (and we don't want to break the build on external and unrelated changes)

Regressions: 1974821
Regressions: 1979505
Depends on: 1985264
No longer depends on: 1985264
Regressions: 1985264
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: