Hub rules-fsharp

rules-fsharp

v2 public Verified

Fsharp

F# is a functional-first, general-purpose, strongly typed, multi-paradigm programming language. These rules govern F# development patterns, type safety, and idiomatic code generation for AI agents.

@sigmashakeinc 2 pulls 6 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-fsharp →
Severity
4 error 2 warn 0 info
demo.cast
F# is a functional-first, general-purpose, strongly typed, multi-paradigm programming language. These rules govern F# development patterns, type safety, and idiomatic code generation for AI agents.

Rules index

6 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

fsharp

fsharp-deprecated-webclient warning log

Usage of deprecated 'System.Net.WebClient' detected. 'WebClient' is an older API and is not recommended for new development due to its limited features and potential security implications (e.g., default TLS versions). Consider using 'System.Net.Http.HttpClient' for modern, more secure, and flexible HTTP communication.

Rule source requires an active Pro or Enterprise subscription.
fsharp-insecure-deserialization-binaryformatter error block

Insecure Deserialization detected. Using 'BinaryFormatter' to deserialize untrusted data can lead to arbitrary code execution (Remote Code Execution). This API is considered highly insecure. Prefer safer serialization formats like JSON (e.g., 'System.Text.Json' or Newtonsoft.Json) or Protocol Buffers, and ensure deserialization only occurs from trusted sources with strict type constraints.

Rule source requires an active Pro or Enterprise subscription.
fsharp-insecure-encoding-ascii warning log

Usage of 'System.Text.Encoding.ASCII' detected. ASCII encoding can lead to data loss or incorrect interpretation for non-ASCII characters, which are common in internationalized applications. It's generally safer and more robust to use 'System.Text.Encoding.UTF8' for text encoding, as it supports a much wider range of characters and is the de-facto standard for web and modern applications.

Rule source requires an active Pro or Enterprise subscription.
fsharp-path-traversal-sprintf error block

Potential Path Traversal vulnerability detected. Using 'sprintf' or string concatenation to construct file paths for 'System.IO.File' operations without proper sanitization or validation can allow an attacker to access or modify arbitrary files outside the intended directory. Always validate and sanitize user-supplied path components, or use 'Path.GetFullPath' combined with strict directory checks, or whitelist allowed file names.

Rule source requires an active Pro or Enterprise subscription.
fsharp-sql-command-injection error block

Potential SQL or Command Injection vulnerability detected. Using 'sprintf' or string concatenation directly within 'SqlCommand' or 'Process.Start' can allow untrusted input to modify queries or execute arbitrary commands. Always use parameterized queries for database access (e.g., 'SqlCommand.Parameters.AddWithValue') and 'ProcessStartInfo' with 'UseShellExecute = false' and arguments passed as a list, not a single formatted string, to prevent injection.

Rule source requires an active Pro or Enterprise subscription.
fsharp-weak-cryptography-md5-sha1 error block

Weak Cryptographic Hash Algorithm detected. MD5 and SHA1 are cryptographically broken and should not be used for security-sensitive operations like password hashing, digital signatures, or integrity checks. Use stronger algorithms like SHA256 or SHA512 (e.g., 'System.Security.Cryptography.SHA256.Create()'). For password hashing, use 'Rfc2898DeriveBytes' or Argon2.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v2
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
89e34df47a88cdaa2f8a79f6c7e3537bb23a23ae2aa9863c2ccc055b0879cb9c
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-fsharp/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-fsharp. The published version only bumps when a maintainer resyncs.

No commit history available.